Document#

class Document[source]#

Document entry (e.g.​ 2000-01-01 balance Assets:Foo "foo.pdf").

property account: str#
property date: datetime.date#
property filename: str#
property indent_by: str#
property inline_comment: Optional[str]#
property leading_comment: Optional[str]#
property meta: Intersection[MutableSequence[MetaItem], MutableMapping[str, MetaValue | MetaRawValue]]#
property raw_account: Account#
property raw_date: Date#
property raw_filename: EscapedString#
property raw_inline_comment: Optional[InlineComment]#
property raw_leading_comment: Optional[BlockComment]#
property raw_meta: Intersection[MutableSequence[MetaItem], MutableMapping[str, MetaItem]]#
property raw_meta_with_comments: MutableSequence[MetaItem | BlockComment]#
property raw_trailing_comment: Optional[BlockComment]#
property tags: MutableSequence[str]#
property trailing_comment: Optional[str]#
property raw_spacing_after: Sequence[RawTokenModel]#
property raw_spacing_before: Sequence[RawTokenModel]#
property spacing_after: str#
property spacing_before: str#
classmethod from_children(date: Date, account: Account, filename: EscapedString, *, leading_comment: Optional[BlockComment] = None, tags_links: Iterable[Link | Tag] = (), inline_comment: Optional[InlineComment] = None, meta: Iterable[MetaItem | BlockComment] = (), trailing_comment: Optional[BlockComment] = None, indent_by: str = '    ') Self[source]#
classmethod from_value(date: datetime.date, account: str, filename: str, *, tags: Iterable[str] = (), links: Iterable[str] = (), leading_comment: Optional[str] = None, inline_comment: Optional[str] = None, meta: Optional[Mapping[str, MetaValue | MetaRawValue]] = None, trailing_comment: Optional[str] = None, indent_by: str = '    ') Self[source]#
auto_claim_comments() None[source]#
claim_leading_comment(*, ignore_if_already_claimed: bool = False) Optional[BlockComment]#
claim_trailing_comment(*, ignore_if_already_claimed: bool = False) Optional[BlockComment]#
unclaim_leading_comment() Optional[BlockComment]#
unclaim_trailing_comment() Optional[BlockComment]#