airstorm.fields module

class Field(model, schema: dict)[source]

Bases: object

This property like object will map against a table field exposed as a snake_cased attribute on the model.

Parameters
  • model (airstorm.model.Model) – The model this field belongs to.

  • schema (dict) – The schema for this field.

Returns

airstorm.fields.Field – The initatiazed field object.

raw_value(record)[source]
symmetric_field()[source]

For foreign key fields this return the reversed field in the foreign table.

Returns

airtstorm.field.Field – The symmetric field.

class EditableField(model, schema: dict)[source]

Bases: airstorm.fields.Field

Field that can be edited.

__set__(instance, value)[source]

Sets the value of the field. The value is “local” until the changes are pushed.

__delete__(instance)[source]

Reset the local change for this field.