piecash._common module¶
-
class
piecash._common.
Recurrence
(*args, **kwargs)[source]¶ Bases:
sqlalchemy.ext.declarative.api.DeclarativeBase
Recurrence information for scheduled transactions
-
obj_guid
¶ str – link to the parent ScheduledTransaction record.
-
recurrence_mult
¶ int – Multiplier for the period type. Describes how many times the period repeats for the next occurrence.
-
recurrence_period_type
¶ str – type or recurrence (monthly, daily).
-
recurrence_period_start
¶ date – the date the recurrence starts.
-
recurrence_weekend_adjust
¶ str – adjustment to be made if the next occurrence falls on weekend / non-working day.
-
-
piecash._common.
hybrid_property_gncnumeric
(num_col, denom_col)[source]¶ Return an hybrid_property handling a Decimal represented by a numerator and a denominator column. It assumes the python field related to the sqlcolumn is named as _sqlcolumn.
Returns: sqlalchemy.ext.hybrid.hybrid_property
-
class
piecash._common.
CallableList
(*args)[source]¶ Bases:
list
A simple class (inherited from list) allowing to retrieve a given list element with a filter on an attribute.
It can be used as the collection_class of a sqlalchemy relationship or to wrap any list (see examples in
piecash.core.session.GncSession
)-
get
(**kwargs)¶ Return the first element of the list that has attributes matching the kwargs dict. The get method is an alias for this method.
To be used as:
l(mnemonic="EUR", namespace="CURRENCY")
-