rechu package¶
Subpackages¶
- rechu.command package
- rechu.inventory package
- rechu.io package
- rechu.matcher package
- rechu.models package
- rechu.types package
Submodules¶
rechu.database module¶
Database access.
rechu.settings module¶
Settings module.
- class rechu.settings.Settings(path: str | PathLike[str] = 'settings.toml', environment: bool = True, prefix: tuple[str, ...] = (), fallbacks: tuple[_SettingsFile, ...] = ())[source]¶
Bases:
object
Settings reader and provider.
- FILES: tuple[_SettingsFile, ...] = ({'path': 'settings.toml'}, {'environment': False, 'path': 'pyproject.toml', 'prefix': ('tool', 'rechu')}, {'environment': False, 'path': PosixPath('/home/runner/work/rechu/rechu/rechu/settings.toml')})¶
- get(section: str, key: str) str [source]¶
Retrieve a settings value from the file based on its section name, which refers to a TOML table grouping multiple settings, and its key, potentially with an environment variable override.
- get_comments() dict[str, dict[str, list[str]]] [source]¶
Retrieve comments of the settings by section.
This retrieves comments for a setting from the settings file latest in the chain that has comments. Only comments preceding the setting are preserved.
- get_document() TOMLDocument [source]¶
Reconstruct a TOML document with overrides from environment variables, default values and comments from fallbacks.
Module contents¶
Receipt cataloging module.