rechu package¶
Subpackages¶
- rechu.command package
- rechu.inventory package
- rechu.io package
- rechu.matcher package
- rechu.models package
- Submodules
- rechu.models.base module
- rechu.models.product module
DiscountMatch
LabelMatch
PriceMatch
Product
Product.alcohol
Product.brand
Product.category
Product.check_merge()
Product.clear()
Product.copy()
Product.description
Product.discounts
Product.generic
Product.generic_id
Product.gtin
Product.id
Product.labels
Product.merge()
Product.portions
Product.prices
Product.range
Product.replace()
Product.shop
Product.shop_meta
Product.sku
Product.type
Product.volume
Product.weight
- rechu.models.receipt module
Discount
ProductItem
ProductItem.amount
ProductItem.discount_indicator
ProductItem.discount_indicators
ProductItem.discounts
ProductItem.id
ProductItem.label
ProductItem.position
ProductItem.price
ProductItem.product
ProductItem.product_id
ProductItem.quantity
ProductItem.receipt
ProductItem.receipt_key
ProductItem.unit
Receipt
- rechu.models.shop module
- Module contents
Base
Product
Product.alcohol
Product.brand
Product.category
Product.check_merge()
Product.clear()
Product.copy()
Product.description
Product.discounts
Product.generic
Product.generic_id
Product.gtin
Product.id
Product.labels
Product.merge()
Product.portions
Product.prices
Product.range
Product.replace()
Product.shop
Product.shop_meta
Product.sku
Product.type
Product.volume
Product.weight
Receipt
Shop
- 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.