-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Formalize a ledger type + API:
TransactionLedger
Add a new `class TransactionLedger(collections.UserDict)` for managing ledger (files) from a `dict`-like API. The main motivations being easy conversion between `dict` <-> `Transaction` obj forms as well as dynamic (toml) file updates via a set of methods: - `.write_config()` to render and write state to the local toml file. - `.iter_trans()` to allow iterator style conversion to `Transaction` form for each entry. - `.to_trans()` for the dict output from the above. Some adjustments to `Transaction` namely making `.sym/.sys` optional for now so that paper engine entries can be loaded (offline) without connecting to the emulated broker backend. Move to using `pathlib.Path` throughout for bootyful toml file mgmt B)
- Loading branch information
Showing
2 changed files
with
165 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters