Skip to content
New: Star-import, signal unraveling, Python 3.12 support, and more

#
saver module

Classes for scheduling data saves.

## CSVDataSaver class

    CSVDataSaver(
        data,
        save_kwargs=None,
        init_save_kwargs=None,
        **kwargs
    )

Subclass of DataSaver for saving data with Data.to_csv().

Superclasses

- Cacheable
- Chainable
- Comparable
- Configured
- DataSaver
- DataUpdater
- HasSettings
- Pickleable
- Prettified

Inherited members

- Cacheable.get_ca_setup()
- Chainable.pipe()
- Configured.copy()
- Configured.equals()
- Configured.get_writeable_attrs()
- Configured.prettify()
- Configured.replace()
- Configured.resolve_merge_kwargs()
- Configured.update_config()
- DataSaver.config
- DataSaver.data
- DataSaver.init_save_kwargs
- DataSaver.rec_state
- DataSaver.save_kwargs
- DataSaver.schedule_manager
- DataSaver.update()
- DataSaver.update_every()
- DataSaver.update_kwargs
- HasSettings.get_path_setting()
- HasSettings.get_path_settings()
- HasSettings.get_setting()
- HasSettings.get_settings()
- HasSettings.has_path_setting()
- HasSettings.has_path_settings()
- HasSettings.has_setting()
- HasSettings.has_settings()
- HasSettings.reset_settings()
- HasSettings.resolve_setting()
- HasSettings.resolve_settings_paths()
- HasSettings.set_settings()
- Pickleable.decode_config()
- Pickleable.decode_config_node()
- Pickleable.dumps()
- Pickleable.encode_config()
- Pickleable.encode_config_node()
- Pickleable.file_exists()
- Pickleable.getsize()
- Pickleable.load()
- Pickleable.loads()
- Pickleable.modify_state()
- Pickleable.resolve_file_path()
- Pickleable.save()

### init_save_data method

    CSVDataSaver.init_save_data(
        **to_csv_kwargs
    )

Save initial data.

### save_data method

    CSVDataSaver.save_data(
        **to_csv_kwargs
    )

Save data.

By default, appends new data without header.

## DataSaver class

    DataSaver(
        data,
        save_kwargs=None,
        init_save_kwargs=None,
        **kwargs
    )

Base class for scheduling data saves.

Subclasses DataUpdater.

Args

`data` :`Data`
  Data instance.
`save_kwargs` :`dict`
  Default keyword arguments for DataSaver.init_save_data() and DataSaver.save_data().
`init_save_kwargs` :`dict`
  Default keyword arguments overriding `save_kwargs` for DataSaver.init_save_data().
`**kwargs`
  Keyword arguments passed to the constructor of `DataUpdater`.

Superclasses

- Cacheable
- Chainable
- Comparable
- Configured
- DataUpdater
- HasSettings
- Pickleable
- Prettified

Inherited members

- Cacheable.get_ca_setup()
- Chainable.pipe()
- Configured.copy()
- Configured.equals()
- Configured.get_writeable_attrs()
- Configured.prettify()
- Configured.replace()
- Configured.resolve_merge_kwargs()
- Configured.update_config()
- DataUpdater.config
- DataUpdater.data
- DataUpdater.rec_state
- DataUpdater.schedule_manager
- DataUpdater.update_kwargs
- HasSettings.get_path_setting()
- HasSettings.get_path_settings()
- HasSettings.get_setting()
- HasSettings.get_settings()
- HasSettings.has_path_setting()
- HasSettings.has_path_settings()
- HasSettings.has_setting()
- HasSettings.has_settings()
- HasSettings.reset_settings()
- HasSettings.resolve_setting()
- HasSettings.resolve_settings_paths()
- HasSettings.set_settings()
- Pickleable.decode_config()
- Pickleable.decode_config_node()
- Pickleable.dumps()
- Pickleable.encode_config()
- Pickleable.encode_config_node()
- Pickleable.file_exists()
- Pickleable.getsize()
- Pickleable.load()
- Pickleable.loads()
- Pickleable.modify_state()
- Pickleable.resolve_file_path()
- Pickleable.save()

Subclasses

- CSVDataSaver
- DuckDBDataSaver
- HDFDataSaver
- SQLDataSaver

### init_save_data method

    DataSaver.init_save_data(
        **kwargs
    )

Save initial data.

This is an abstract method - override it to define custom logic.

### init_save_kwargs property

Keyword arguments passed to DataSaver.init_save_data().

### save_data method

    DataSaver.save_data(
        **kwargs
    )

Save data.

This is an abstract method - override it to define custom logic.

### save_kwargs property

Keyword arguments passed to DataSaver.save_data().

### update method

    DataSaver.update(
        save_kwargs=None,
        **kwargs
    )

Update and save data using DataSaver.save_data().

Override to do pre- and postprocessing.

To stop this method from running again, raise CancelledError.

### update_every method

    DataSaver.update_every(
        *args,
        save_kwargs=None,
        init_save=False,
        init_save_kwargs=None,
        **kwargs
    )

Overrides DataUpdater to save initial data prior to updating.

## DuckDBDataSaver class

    DuckDBDataSaver(
        data,
        save_kwargs=None,
        init_save_kwargs=None,
        **kwargs
    )

Subclass of DataSaver for saving data with Data.to_duckdb().

Superclasses

- Cacheable
- Chainable
- Comparable
- Configured
- DataSaver
- DataUpdater
- HasSettings
- Pickleable
- Prettified

Inherited members

- Cacheable.get_ca_setup()
- Chainable.pipe()
- Configured.copy()
- Configured.equals()
- Configured.get_writeable_attrs()
- Configured.prettify()
- Configured.replace()
- Configured.resolve_merge_kwargs()
- Configured.update_config()
- DataSaver.config
- DataSaver.data
- DataSaver.init_save_kwargs
- DataSaver.rec_state
- DataSaver.save_kwargs
- DataSaver.schedule_manager
- DataSaver.update()
- DataSaver.update_every()
- DataSaver.update_kwargs
- HasSettings.get_path_setting()
- HasSettings.get_path_settings()
- HasSettings.get_setting()
- HasSettings.get_settings()
- HasSettings.has_path_setting()
- HasSettings.has_path_settings()
- HasSettings.has_setting()
- HasSettings.has_settings()
- HasSettings.reset_settings()
- HasSettings.resolve_setting()
- HasSettings.resolve_settings_paths()
- HasSettings.set_settings()
- Pickleable.decode_config()
- Pickleable.decode_config_node()
- Pickleable.dumps()
- Pickleable.encode_config()
- Pickleable.encode_config_node()
- Pickleable.file_exists()
- Pickleable.getsize()
- Pickleable.load()
- Pickleable.loads()
- Pickleable.modify_state()
- Pickleable.resolve_file_path()
- Pickleable.save()

### init_save_data method

    DuckDBDataSaver.init_save_data(
        **to_duckdb_kwargs
    )

Save initial data.

### save_data method

    DuckDBDataSaver.save_data(
        **to_duckdb_kwargs
    )

Save data.

By default, appends new data without header.

## HDFDataSaver class

    HDFDataSaver(
        data,
        save_kwargs=None,
        init_save_kwargs=None,
        **kwargs
    )

Subclass of DataSaver for saving data with Data.to_hdf().

Superclasses

- Cacheable
- Chainable
- Comparable
- Configured
- DataSaver
- DataUpdater
- HasSettings
- Pickleable
- Prettified

Inherited members

- Cacheable.get_ca_setup()
- Chainable.pipe()
- Configured.copy()
- Configured.equals()
- Configured.get_writeable_attrs()
- Configured.prettify()
- Configured.replace()
- Configured.resolve_merge_kwargs()
- Configured.update_config()
- DataSaver.config
- DataSaver.data
- DataSaver.init_save_kwargs
- DataSaver.rec_state
- DataSaver.save_kwargs
- DataSaver.schedule_manager
- DataSaver.update()
- DataSaver.update_every()
- DataSaver.update_kwargs
- HasSettings.get_path_setting()
- HasSettings.get_path_settings()
- HasSettings.get_setting()
- HasSettings.get_settings()
- HasSettings.has_path_setting()
- HasSettings.has_path_settings()
- HasSettings.has_setting()
- HasSettings.has_settings()
- HasSettings.reset_settings()
- HasSettings.resolve_setting()
- HasSettings.resolve_settings_paths()
- HasSettings.set_settings()
- Pickleable.decode_config()
- Pickleable.decode_config_node()
- Pickleable.dumps()
- Pickleable.encode_config()
- Pickleable.encode_config_node()
- Pickleable.file_exists()
- Pickleable.getsize()
- Pickleable.load()
- Pickleable.loads()
- Pickleable.modify_state()
- Pickleable.resolve_file_path()
- Pickleable.save()

### init_save_data method

    HDFDataSaver.init_save_data(
        **to_hdf_kwargs
    )

Save initial data.

### save_data method

    HDFDataSaver.save_data(
        **to_hdf_kwargs
    )

Save data.

By default, appends new data in a table format.

## SQLDataSaver class

    SQLDataSaver(
        data,
        save_kwargs=None,
        init_save_kwargs=None,
        **kwargs
    )

Subclass of DataSaver for saving data with Data.to_sql().

Superclasses

- Cacheable
- Chainable
- Comparable
- Configured
- DataSaver
- DataUpdater
- HasSettings
- Pickleable
- Prettified

Inherited members

- Cacheable.get_ca_setup()
- Chainable.pipe()
- Configured.copy()
- Configured.equals()
- Configured.get_writeable_attrs()
- Configured.prettify()
- Configured.replace()
- Configured.resolve_merge_kwargs()
- Configured.update_config()
- DataSaver.config
- DataSaver.data
- DataSaver.init_save_kwargs
- DataSaver.rec_state
- DataSaver.save_kwargs
- DataSaver.schedule_manager
- DataSaver.update()
- DataSaver.update_every()
- DataSaver.update_kwargs
- HasSettings.get_path_setting()
- HasSettings.get_path_settings()
- HasSettings.get_setting()
- HasSettings.get_settings()
- HasSettings.has_path_setting()
- HasSettings.has_path_settings()
- HasSettings.has_setting()
- HasSettings.has_settings()
- HasSettings.reset_settings()
- HasSettings.resolve_setting()
- HasSettings.resolve_settings_paths()
- HasSettings.set_settings()
- Pickleable.decode_config()
- Pickleable.decode_config_node()
- Pickleable.dumps()
- Pickleable.encode_config()
- Pickleable.encode_config_node()
- Pickleable.file_exists()
- Pickleable.getsize()
- Pickleable.load()
- Pickleable.loads()
- Pickleable.modify_state()
- Pickleable.resolve_file_path()
- Pickleable.save()

### init_save_data method

    SQLDataSaver.init_save_data(
        **to_sql_kwargs
    )

Save initial data.

### save_data method

    SQLDataSaver.save_data(
        **to_sql_kwargs
    )

Save data.

By default, appends new data without header.

#### Cookie consent

We use cookies to recognize your repeated visits and preferences, as well as to measure the effectiveness of our documentation and whether users find what they're searching for. With your consent, you're helping us to make our documentation better.

- Google Analytics
- GitHub

Manage settings