piecash._common module — Python interface to GnuCash documents 0.15.0 documentation

# piecash._common module

exception `piecash._common.` `GnucashException`

  Bases: `Exception`

exception `piecash._common.` `GncNoActiveSession`

  Bases: `piecash._common.GnucashException`

exception `piecash._common.` `GncValidationError`

  Bases: `piecash._common.GnucashException`

exception `piecash._common.` `GncImbalanceError`

  Bases: `piecash._common.GncValidationError`

exception `piecash._common.` `GncConversionError`

  Bases: `piecash._common.GnucashException`

class `piecash._common.` `Recurrence`(*args, **kwargs)

  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)

  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)

  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")