piecash.sa_extra module

piecash.sa_extra.mapped_to_slot_property(col, slot_name, slot_transform=<function <lambda>>)[source]

Assume the attribute in the class as the same name as the table column with “_” prepended

piecash.sa_extra.pure_slot_property(slot_name, slot_transform=<function <lambda>>)[source]

Create a property (class must have slots) that maps to a slot

Parameters:
  • slot_name – name of the slot
  • slot_transform – transformation to operate before assigning value
Returns:

piecash.sa_extra.get_foreign_keys(metadata, engine)[source]

Retrieve all foreign keys from metadata bound to an engine :param metadata: :param engine: :return: