swimlane.core.fields.base.field module

class swimlane.core.fields.base.field.Field(name, record)[source]

Bases: SwimlaneResolver

Base class for abstracting Swimlane complex types

bulk_modify_support = True
cast_to_bulk_modify(value)[source]

Cast single value to bulk modify format, defaults to cast_to_report with added validation

cast_to_python(value)[source]

Called during set_swimlane, should accept a single raw value as provided from API

Defaults to no-op

cast_to_report(value)[source]

Cast single value to report format, defaults to cast_to_swimlane(value)

cast_to_swimlane(value)[source]

Called during get_swimlane, should accept a python value and return swimlane representation

Defaults to no-op

field_type = None
for_json()[source]

Return json.dump()-compatible representation of field value

New in version 4.1.0.

get_batch_representation()[source]

Return best batch process representation of field value

get_bulk_modify(value)[source]

Return value in format for bulk modify

get_item()[source]

Return best python representation of field value for get attribute method

get_python()[source]

Return best python representation of field value

get_report(value)[source]

Return provided field Python value formatted for use in report filter

get_swimlane()[source]

Return best swimlane representation of field value

property record

Resolve weak reference to parent record

set_python(value)[source]

Set field internal value from the python representation of field value

set_swimlane(value)[source]

Set field internal value from the swimlane representation of field value

supported_types = []
validate_value(value)[source]

Validate value is an acceptable type during set_python operation