beancount_periodic/common/__init__.py
raw| 1 | import collections |
| 2 | from typing import List |
| 3 | from datetime import date |
| 4 | from decimal import Decimal |
| 5 | from typing import NamedTuple |
| 6 | |
| 7 | PeriodicConfig = NamedTuple('PeriodicConfig', [ |
| 8 | ('total', Decimal), |
| 9 | ('start', date), |
| 10 | ('duration', int), |
| 11 | ('steps', List), |
| 12 | ('equal_amount', bool), |
| 13 | ('salvage_value', Decimal), |
| 14 | ('formula', str) |
| 15 | ]) |
| 16 | |
| 17 | PeriodicConfigError = collections.namedtuple('ReserveConfigError', 'source message entry') |