ftrack_api.entity.user

class ftrack_api.entity.user.User(session, data=None, reconstructing=False)[source]

Represent a user.

start_timer(context=None, comment='', name=None, force=False)[source]

Start a timer for context and return it.

force can be used to automatically stop an existing timer and create a timelog for it. If you need to get access to the created timelog, use stop_timer() instead.

comment and name are optional but will be set on the timer.

Note

This method will automatically commit the changes and if force is False then it will fail with a ftrack_api.exception.NotUniqueError exception if a timer is already running.

stop_timer()[source]

Stop the current timer and return a timelog created from it.

If a timer is not running, a ftrack_api.exception.NoResultFoundError exception will be raised.

Note

This method will automatically commit the changes.

send_invite()[source]

Send a invation email to the user

reset_api_key()[source]

Reset the users api key.

__init__(session, data=None, reconstructing=False)

Initialise entity.

session is an instance of ftrack_api.session.Session that this entity instance is bound to.

data is a mapping of key, value pairs to apply as initial attribute values.

reconstructing indicates whether this entity is being reconstructed, such as from a query, and therefore should not have any special creation logic applied, such as initialising defaults for missing data.

attributes = None
clear()

Reset all locally modified attribute values.

default_projections = None
entity_type = 'Entity'
get(k[, d]) D[k] if k in D, else d.  d defaults to None.
items()

Return list of tuples of (key, value) pairs.

Note

Will fetch all values from the server if not already fetched or set locally.

keys() a set-like object providing a view on D's keys
merge(entity, merged=None)

Merge entity attribute values and other data into this entity.

Only merge values from entity that are not ftrack_api.symbol.NOT_SET.

Return a list of changes made with each change being a mapping with the keys:

  • type - Either ‘remote_attribute’, ‘local_attribute’ or ‘property’.

  • name - The name of the attribute / property modified.

  • old_value - The previous value.

  • new_value - The new merged value.

pop(k[, d]) v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised.

popitem() (k, v), remove and return some (key, value) pair

as a 2-tuple; but raise KeyError if D is empty.

primary_key_attributes = None
setdefault(k[, d]) D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) None.  Update D from mapping/iterable E and F.

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

values()

Return list of values.