snapsheets.book

from snapsheets.book import Book

book = Book("config.toml")
book.snapshots()

# πŸ“£ Sample spreadsheet for snapsheets. (%Y%m%d)
# πŸ€– Downloaded sample1.csv
# πŸš€ Rnamed sample1.csv to 20220602_sample1.csv
# πŸ“£ Sample spreadsheet for snapsheets. (%Y%m)
# πŸ€– Downloaded sample2.csv
# πŸš€ Rnamed sample2.csv to 202206_sample2.csv

Module Contents

Classes

Book

A class for collection of spreadsheets

API

class snapsheets.book.Book

A class for collection of spreadsheets

fname: str

β€˜config.toml’

config filename or directory

__post_init__() None
get_fnames() list[pathlib.Path]

Get list of configuration files.

Returns

list[Path] list of configuration files

load_config() dict

Load configuration from files.

  • Supported format: toml, .yml, and .yaml

Returns

dict configuration in dict-object

load_config_toml(fname: pathlib.Path) dict

Load configurations from TOML format.

Parameters

fname : Path config filename

Returns

dict config as dict-object

load_config_yaml(fname: pathlib.Path) dict

Load configurations from YAML format.

Parameters

fname : Path config filename

Returns

dict config as dict-object

get_sheets() list[snapsheets.sheet.Sheet]

Get list of sheets in configuration.

Returns

list[Sheet] list of Sheet objects

snapshots() None

Take a snapshot of sheets.