import dataclasses import datetime from collections.abc import Mapping from decimal import Decimal import enforce_typing from fin_defs import Asset @enforce_typing.enforce_types @dataclasses.dataclass class Depo: name: str updated_time: datetime.datetime @enforce_typing.enforce_types @dataclasses.dataclass class DepoSingle(Depo): assets: Mapping[Asset, Decimal] @enforce_typing.enforce_types @dataclasses.dataclass class DepoGroup(Depo): nested: list[Depo]