ftrack_api.entity.factory

class ftrack_api.entity.factory.Factory[source]

Entity class factory.

__init__()[source]

Initialise factory.

create(schema, bases=None)[source]

Create and return entity class from schema.

bases should be a list of bases to give the constructed class. If not specified, default to ftrack_api.entity.base.Entity.

create_scalar_attribute(class_name, name, mutable, computed, default, data_type)[source]

Return appropriate scalar attribute instance.

create_reference_attribute(class_name, name, mutable, reference)[source]

Return appropriate reference attribute instance.

create_collection_attribute(class_name, name, mutable)[source]

Return appropriate collection attribute instance.

create_mapped_collection_attribute(class_name, name, mutable, reference)[source]

Return appropriate mapped collection attribute instance.

class ftrack_api.entity.factory.PerSessionDefaultKeyMaker[source]

Generate key for defaults.

__init__()

Initialise key maker.

key(*items)

Return key for items.

ftrack_api.entity.factory.memoise_session(function)

Memoiser for use with callables that should be called once per session.

class ftrack_api.entity.factory.StandardFactory[source]

Standard entity class factory.

create(schema, bases=None)[source]

Create and return entity class from schema.

create_mapped_collection_attribute(class_name, name, mutable, reference)[source]

Return appropriate mapped collection attribute instance.

__init__()

Initialise factory.

create_collection_attribute(class_name, name, mutable)

Return appropriate collection attribute instance.

create_reference_attribute(class_name, name, mutable, reference)

Return appropriate reference attribute instance.

create_scalar_attribute(class_name, name, mutable, computed, default, data_type)

Return appropriate scalar attribute instance.