Specifications
The philosophy behind this client is to allow you to make common operation as simply as possible. We want to provide helpers to make your development faster. If you think that one is missing, feel free to ask for it in the Github issues. Even better, you can contribute by directly adding it to the code.
The client is divided in multiple modules:
asset: functions related to asset and asset types.
cache: functions related to the cache.
casting: functions related to casting.
client: generic functions to deal with the API.
concept: functions related to concepts.
edit: functions related to edits.
entity: functions related to entities.
exceptions: exceptions raised by Gazu.
files: functions related to file path generation.
person: functions related to studio members.
playlist: functions related to project playlists.
project: functions related to running productions.
scene: functions related to layout scenes (which will lead to shots).
shot: functions related to shots, sequences and episodes.
sync: functions related to sync.
task: functions related to tasks, task types and assignations.
user: functions related to current user data.
In the following, we are going to describe all functions available in the Gazu client.
gazu
gazu.asset
- gazu.asset.all_asset_instances_for_asset(asset: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[str][source]
- Parameters:
asset (str / dict) – The asset dict or the asset ID.
- Returns:
Asset instances existing for a given asset.
- Return type:
list
- gazu.asset.all_asset_instances_for_shot(shot: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[str][source]
- Parameters:
shot (str / dict) – The shot dict or the shot ID.
- Returns:
Asset instances existing for a given shot.
- Return type:
list
- gazu.asset.all_asset_types(client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Returns:
Asset types stored in the database.
- Return type:
list
- gazu.asset.all_asset_types_for_project(project: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
project (str / dict) – The project dict or the project ID.
- Returns:
Asset types from assets listed in given project.
- Return type:
list
- gazu.asset.all_asset_types_for_shot(shot: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
shot (str / dict) – The shot dict or the shot ID.
- Returns:
Asset types from assets casted in given shot.
- Return type:
list
- gazu.asset.all_assets_for_episode(episode: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
episode (str / dict) – The episode dict or the episode ID.
- Returns:
Assets stored in the database for given episode.
- Return type:
list
- gazu.asset.all_assets_for_open_projects(client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Returns:
Assets stored in the database for open projects.
- Return type:
list
- gazu.asset.all_assets_for_project(project: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
project (str / dict) – The project dict or the project ID.
- Returns:
Assets stored in the database for given project.
- Return type:
list
- gazu.asset.all_assets_for_project_and_type(project: str | dict, asset_type: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
project (str / dict) – The project dict or the project ID.
asset_type (str / dict) – The asset type dict or the asset type ID.
- Returns:
Assets stored in the database for given project and asset type.
- Return type:
list
- gazu.asset.all_assets_for_shot(shot: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
shot (str / dict) – The shot dict or the shot ID.
- Returns:
Assets stored in the database for given shot.
- Return type:
list
- gazu.asset.all_scene_asset_instances_for_asset(asset: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[str][source]
- Parameters:
asset (str / dict) – The asset dict or the asset ID.
- Returns:
Scene asset instances existing for a given asset.
- Return type:
list
- gazu.asset.all_shot_asset_instances_for_asset(asset: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
asset (str / dict) – The asset dict or the asset ID.
- Returns:
Asset instances existing for a given asset.
- Return type:
list
- gazu.asset.disable_asset_instance(asset_instance: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Set active flag of given asset instance to False.
- Parameters:
asset_instance (str / dict) – The asset instance dict or ID.
- gazu.asset.enable_asset_instance(asset_instance: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Set active flag of given asset instance to True.
- Parameters:
asset_instance (str / dict) – The asset instance dict or ID.
- gazu.asset.export_assets_with_csv(project: str | dict, csv_file_path: str, episode: str | dict | None = None, assigned_to: str | dict | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) Response[source]
Export the Assets data for a project to a CSV file on disk.
- Parameters:
project (str | dict) – The ID or dict for the project to export.
csv_file_path (str) – The path on disk to write the file to. If the path already exists it will be overwritten.
episode (str | dict | None) – Only export Assets that are linked to the given Episode, which can be provided as an ID string or model dict. If None, all assets will be exported.
assigned_to (str | dict | None) – Only export Assets that have one or more Tasks assigned to the given Person, specified as an ID string or model dict. If None, no filtering is put in place.
- Returns:
the response from the API server.
- Return type:
(requests.Response)
- gazu.asset.get_asset(asset_id: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
- Parameters:
asset_id (str) – ID of claimed asset.
- Returns:
Asset matching given ID.
- Return type:
dict
- gazu.asset.get_asset_by_name(project: str | dict, name: str, asset_type: str | dict | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict | None[source]
- Parameters:
project (str / dict) – The project dict or the project ID.
name (str) – The asset name
asset_type (str / dict) – Asset type dict or ID (optional).
- Returns:
Asset matching given name for given project and asset type.
- Return type:
dict
- gazu.asset.get_asset_instance(asset_instance_id: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
- Parameters:
asset_instance_id (str) – ID of claimed asset instance.
- Returns:
Asset Instance matching given ID.
- Return type:
dict
- gazu.asset.get_asset_type(asset_type_id: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
- Parameters:
asset_type_id (str) – ID of claimed asset type.
- Returns:
Asset Type matching given ID.
- Return type:
dict
- gazu.asset.get_asset_type_by_name(name: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict | None[source]
- Parameters:
name (str) – name of asset type.
- Returns:
- Asset Type matching given name, or None if no asset type
exists with that name.
- Return type:
dict | None
- gazu.asset.get_asset_type_from_asset(asset: dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
- Parameters:
asset (dict) – The asset dict.
- Returns:
Asset type which is the type of given asset.
- Return type:
dict
- gazu.asset.get_asset_url(asset: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
- Parameters:
asset (str / dict) – The asset dict or the asset ID.
- Returns:
Web url associated to the given asset
- Return type:
url (str)
- gazu.asset.get_episode_from_asset(asset: dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict | None[source]
Return the Episode that the given Asset is linked to.
If the Asset isn’t linked to a particular Episode (i.e it’s part of the “Main Pack”), None will be returned.
- Parameters:
asset (dict) – The asset dict.
- Returns:
- Episode which is parent of given asset, or None if not part of
an episode.
- Return type:
dict
- gazu.asset.import_assets_with_csv(project: str | dict, csv_file_path: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Import the Assets from a previously exported CSV file into the given project.
- Parameters:
project (str | dict) – The project to import the Assets into, as an ID string or model dict.
csv_file_path (str) – The path on disk to the CSV file.
- Returns:
the Asset dicts created by the import.
- Return type:
list[dict]
- gazu.asset.new_asset(project: str | dict, asset_type: str | dict, name: str, description: str | None = None, extra_data: dict = {}, episode: str | dict = None, is_shared: bool = False, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Create a new asset in the database for given project and asset type.
- Parameters:
project (str / dict) – The project dict or the project ID.
asset_type (str / dict) – The asset type dict or the asset type ID.
name (str) – Asset name.
description (str) – Additional information.
extra_data (dict) – Free field to add any kind of metadata.
episode (str / dict) – The episode this asset is linked to.
is_shared (bool) – True if asset is shared between multiple projects.
- Returns:
Created asset.
- Return type:
dict
- gazu.asset.new_asset_asset_instance(asset: str | dict, asset_to_instantiate: str | dict, description: str | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Creates a new asset instance for given asset. The instance number is automatically generated (increment highest number).
- Parameters:
asset (str / dict) – The asset dict or the shot ID.
asset_to_instantiate (str / dict) – The asset instance dict or ID.
description (str) – Additional information (optional)
- Returns:
Created asset instance.
- Return type:
(dict)
- gazu.asset.new_asset_type(name: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Create a new asset type in the database, or return the existing asset type if one already exists with that name.
- Parameters:
name (str) – The name of asset type to create.
- Returns:
The created (or already existing) asset type.
- Return type:
(dict)
- gazu.asset.remove_asset(asset: str | dict, force: bool = False, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Remove given asset from database.
If the Asset has tasks linked to it, this will by default mark the Asset as canceled. Deletion can be forced regardless of task links with the force parameter.
- Parameters:
asset (str / dict) – Asset to remove.
force (bool) – Whether to force deletion of the asset regardless of whether it has links to tasks.
- gazu.asset.remove_asset_type(asset_type: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Remove given asset type from database.
- Parameters:
asset_type (str / dict) – Asset type to remove.
- gazu.asset.update_asset(asset: dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Save given asset data into the API. It assumes that the asset already exists.
- Parameters:
asset (dict) – Asset to save.
- gazu.asset.update_asset_data(asset: str | dict, data: dict = {}, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Update the metadata for the provided asset. Keys that are not provided are not changed.
- Parameters:
asset (str / dict) – The asset dict or ID to save in database.
data (dict) – Free field to set metadata of any kind.
- Returns:
Updated asset.
- Return type:
dict
gazu.cache
- gazu.cache.cache(function: Callable, maxsize: int = 300, expire: int = 120) Callable[source]
Decorator that generate cache wrapper and that adds cache feature to target function. A max cache size and and expiration time (in seconds) can be set too.
- Parameters:
function (func) – Decorated function:
maxsize – Number of value stored in cache (300 by default).
expire – Time to live in seconds of stored value (disabled by default)
- gazu.cache.get_cache_key(args: Any, kwargs: Any) str[source]
Serialize arguments to get a cache key. It will be used to store function results.
- Returns:
generated key
- Return type:
str
- gazu.cache.get_value(cache_store: dict, key: str) Any[source]
It generates a deep copy of the requested value. It’s needed because if a pointer is returned, the value can be changed. Which leads to a modified cache and unexpected results.
- Returns:
Value matching given key inside given cache store
- gazu.cache.insert_value(function: Callable, cache_store: dict, args: Any, kwargs: Any) Any[source]
Serialize function call arguments and store function result in given cache store.
- Parameters:
function (func) – The function to cache value for.
cache_store (dict) – The cache which will contain the value to cache.
args – The arguments for which a cache must be set.
kwargs – The arguments for which a cache must be set.
- Returns:
The cached value.
- gazu.cache.is_cache_enabled(state: dict) bool[source]
- Parameters:
state – The state describing the cache state.
- Returns:
True if cache is enabled for given state.
- gazu.cache.is_cache_expired(memo: dict, state: dict, key: str) bool[source]
Check if cache is expired (outdated) for given wrapper state and cache key.
- Parameters:
memo (dict) – The function cache
state (dict) – The parameters of the cache (enabled, expire, maxsize)
key – The key to check
- Returns:
True if cache value is expired.
gazu.casting
- gazu.casting.all_entity_links_for_project(project: str | dict, page: int | None = None, limit: int | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
- Parameters:
project (dict | str) – The project dict or ID.
- Returns:
- A dictionary containing entity links for the project. If pagination
is used, contains “data” (list of entity link dicts) and pagination metadata. Otherwise, returns a list of entity link dictionaries directly. Each entity link dict contains “entity_in_id”, “entity_out_id”, and other link-related fields.
- Return type:
dict
- gazu.casting.delete_entity_link(entity_link: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Delete an entity link.
- Parameters:
entity_link (str / dict) – The entity link dict or the entity link ID.
- Returns:
The deleted entity link.
- Return type:
dict
- gazu.casting.get_asset_cast_in(asset: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Return entity list where given asset is casted.
- Parameters:
asset (dict) – The asset dict or ID.
- Returns:
- A list of entity dictionaries (shots, scenes, etc.) where
the given asset is cast. Each entity dict contains standard entity fields like “id”, “name”, “project_id”, etc.
- Return type:
list[dict]
- gazu.casting.get_asset_casting(asset: dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Return casting for given asset. [{“asset_id”: “asset-1”, “nb_occurences”: 3}]}
- Parameters:
asset (dict) – The asset dict
- Returns:
- A list of casting dictionaries, each containing “asset_id”
and “nb_occurences” keys representing which assets are cast in the given asset and how many times they appear.
- Return type:
list[dict]
- gazu.casting.get_asset_type_casting(project: str | dict, asset_type: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Return casting for given asset_type.
- Parameters:
project (str / dict) – The project dict or the project ID.
asset_type (str / dict) – The asset_type dict or the asset_type ID.
- Returns:
- A dictionary mapping asset IDs to their casting lists. Each casting
list contains dictionaries with “asset_id” and “nb_occurences” keys representing which assets are cast in each asset of this type.
- Return type:
dict
- gazu.casting.get_episode_casting(episode: dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Return casting for given episode. [{“episode_id”: “episode-1”, “nb_occurences”: 3}]}
- Parameters:
episode (dict) – The episode dict
- Returns:
- A list of casting dictionaries, each containing “asset_id”
and “nb_occurences” keys representing which assets are cast in the episode and how many times they appear.
- Return type:
list[dict]
- gazu.casting.get_episode_shots_casting(project: str | dict, episode: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Return casting for all shots in given episode.
- Parameters:
project (str / dict) – The project dict or the project ID.
episode (str / dict) – The episode dict or the episode ID.
- Returns:
- A dictionary mapping shot IDs to their casting lists. Each casting
list contains dictionaries with “asset_id” and “nb_occurences” keys representing which assets are cast in each shot of the episode.
- Return type:
dict
- gazu.casting.get_episodes_casting(project: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Return casting for all episodes in given project.
- Parameters:
project (str / dict) – The project dict or the project ID.
- Returns:
- A dictionary mapping episode IDs to their casting lists. Each
casting list contains dictionaries with “asset_id” and “nb_occurences” keys representing which assets are cast in each episode.
- Return type:
dict
- gazu.casting.get_project_shots_casting(project: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Return casting for all shots in given project.
- Parameters:
project (str / dict) – The project dict or the project ID.
- Returns:
- A dictionary mapping shot IDs to their casting lists. Each casting
list contains dictionaries with “asset_id” and “nb_occurences” keys representing which assets are cast in each shot of the project.
- Return type:
dict
- gazu.casting.get_sequence_casting(sequence: dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Return casting for given sequence.
- Parameters:
sequence (dict) – The sequence dict
- Returns:
- A dictionary mapping shot IDs to their casting lists. Each casting
list contains dictionaries with “asset_id” and “nb_occurences” keys representing which assets are cast in each shot of the sequence.
- Return type:
dict
- gazu.casting.get_sequence_shots_casting(project: str | dict, sequence: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Return casting for all shots in given sequence.
- Parameters:
project (str / dict) – The project dict or the project ID.
sequence (str / dict) – The sequence dict or the sequence ID.
- Returns:
- A dictionary mapping shot IDs to their casting lists. Each casting
list contains dictionaries with “asset_id” and “nb_occurences” keys representing which assets are cast in each shot of the sequence.
- Return type:
dict
- gazu.casting.get_shot_casting(shot: dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Return casting for given shot.
- Parameters:
shot (dict) – The shot dict
- Returns:
- A list of casting dictionaries, each containing “asset_id”
and “nb_occurences” keys representing which assets are cast in the shot and how many times they appear.
- Return type:
list[dict]
- gazu.casting.update_asset_casting(project: str | dict, asset: str | dict, casting: dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Change casting of given asset with given casting (list of asset ids displayed into the asset).
- Parameters:
project (str / dict) – The project dict or asset ID.
asset (str / dict) – The asset dict or the asset ID.
casting (dict) – The casting description.
- Returns:
The updated asset dictionary with the new casting information applied.
- Return type:
dict
- gazu.casting.update_episode_casting(project: str | dict, episode: str | dict, casting: dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Change casting of given episode with given casting (list of asset ids displayed into the episode).
- Parameters:
project (str / dict) – The project dict or ID.
episode (str / dict) – The episode dict or the episode ID.
casting (dict) – The casting description. e.g: casting = [{“asset_id”: “asset-1”, “nb_occurences”: 3}]
- Returns:
The updated episode dictionary with the new casting information applied.
- Return type:
dict
- gazu.casting.update_shot_casting(project: str | dict, shot: str | dict, casting: dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Change casting of given shot with given casting (list of asset ids displayed into the shot).
- Parameters:
project (str / dict) – The project dictionary or ID.
shot (str / dict) – The shot dict or the shot ID.
casting (dict) – The casting description.
Ex – casting = [{“asset_id”: “asset-1”, “nb_occurences”: 3}]
- Returns:
The updated shot dictionary with the new casting information applied.
- Return type:
dict
gazu.client
- gazu.client.build_path_with_params(path: str, params: dict) str[source]
Add params to a path using urllib encoding.
- Parameters:
path (str) – The url base path
params (dict) – The parameters to add as a dict
- Returns:
the built path
- Return type:
str
- gazu.client.check_status(request: Response, path: str, client: KitsuClient = None) tuple[int, bool][source]
Raise an exception related to status code, if the status code does not match a success code. Print error message when it’s relevant.
- Parameters:
request (requests.Response) – The request to validate.
path (str) – The path of the request.
client (KitsuClient) – The client to use for the request.
- Returns:
- The status code, and whether or not to retry the
request.
- Return type:
tuple[int, bool]
- Raises:
ParameterException – when 400 response occurs
NotAuthenticatedException – when 401 response occurs
RouteNotFoundException – when 404 response occurs
NotAllowedException – when 403 response occurs
MethodNotAllowedException – when 405 response occurs
TooBigFileException – when 413 response occurs
ServerErrorException – when 500 response occurs
- gazu.client.create(model_name: str, data: dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Create an entry for given model and data.
- Parameters:
model_name (str) – The model type involved.
data (dict) – The data to use for creation.
client (KitsuClient) – The client to use for the request.
- Returns:
Created entry
- Return type:
dict
- gazu.client.create_client(host: str, ssl_verify: bool = True, cert: str | None = None, use_refresh_token: bool = False, callback_not_authenticated: Callable | None = None, **kwargs: Any) KitsuClient[source]
Create a client with given parameters.
- Parameters:
host (str) – The host to use for requests.
ssl_verify (bool) – Whether to verify SSL certificates.
cert (str) – Path to a client certificate.
use_refresh_token (bool) – Whether to automatically refresh tokens.
callback_not_authenticated (function) – Function to call when not authenticated.
- Returns:
The created client.
- Return type:
KitsuClient
- gazu.client.delete(path: str, params: dict | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Run a delete request toward given path for configured host.
- Parameters:
path (str) – The path to query.
params (dict) – The parameters to pass to the request.
client (KitsuClient) – The client to use for the request.
- Returns:
The request result.
- gazu.client.download(path: str, file_path: str, params: dict | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) Response[source]
Download file located at file_path to given url path.
- Parameters:
path (str) – The url path to download file from.
file_path (str) – The location to store the file on the hard drive.
params (dict) – The parameters to pass to the request.
client (KitsuClient) – The client to use for the request.
- Returns:
Request response object.
- Return type:
Response
- gazu.client.fetch_all(path: str, params: dict | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>, paginated: bool = False, limit: int | None = None) list[dict][source]
- Parameters:
path (str) – The path for which we want to retrieve all entries.
params (dict) – The parameters to pass to the request.
client (KitsuClient) – The client to use for the request.
paginated (bool) – Will query entries page by page.
limit (int) – Limit the number of entries per page.
- Returns:
All entries stored in database for a given model. You can add a filter to the model name like this: “tasks?project_id=project-id”
- Return type:
list
- gazu.client.fetch_first(path: str, params: dict | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict | None[source]
- Parameters:
path (str) – The path for which we want to retrieve the first entry.
params (dict) – The parameters to pass to the request.
client (KitsuClient) – The client to use for the request.
- Returns:
The first entry for which a model is required.
- Return type:
dict
- gazu.client.fetch_one(model_name: str, id: str, params: dict | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Function dedicated at targeting routes that returns a single model instance.
- Parameters:
model_name (str) – Model type name.
id (str) – Model instance ID.
params (dict) – The parameters to pass to the request.
client (KitsuClient) – The client to use for the request.
- Returns:
The model instance matching id and model name.
- Return type:
dict
- gazu.client.get(path: str, json_response: bool = True, params: dict | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) Any[source]
Run a get request toward given path for configured host.
- Parameters:
path (str) – The path to query.
json_response (bool) – Whether to return a json response.
params (dict) – The parameters to pass to the request.
client (KitsuClient) – The client to use for the request.
- Returns:
The request result.
- gazu.client.get_api_url_from_host(client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Get the base URL to the Kitsu instance the client is connected to, without the /api suffix, e.g
This can be used to build URL paths to particular records in the Kitsu web interface.
- Parameters:
client (KitsuClient) – The client to use for the request.
- Returns:
The base Kitsu URL the client is connected to.
- Return type:
str
- gazu.client.get_api_version(client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Get the current version of the API.
- Parameters:
client (KitsuClient) – The client to use for the request.
- Returns:
Current version of the API.
- Return type:
str
- gazu.client.get_current_user(client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Get the current user.
- Parameters:
client (KitsuClient) – The client to use for the request.
- Returns:
User database information for user linked to auth tokens.
- Return type:
dict
- gazu.client.get_event_host(client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Get the host on which listening for events.
- Parameters:
client (KitsuClient) – The client to use for the request.
- Returns:
The event host.
- Return type:
str
- gazu.client.get_file_data_from_url(url: str, full: bool = False, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) bytes[source]
Return data found at given url.
- Parameters:
url (str) – The url to fetch data from.
full (bool) – Whether to use full url.
client (KitsuClient) – The client to use for the request.
- Returns:
The data found at the given url.
- Return type:
bytes
- gazu.client.get_full_url(path: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Join host url with given path.
- Parameters:
path (str) – The path to integrate to host url.
- Returns:
The result of joining configured host url with given path.
- gazu.client.get_host(client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
- Get the API URL for the Kitsu host the given client is connected to, e.g
- Parameters:
client (KitsuClient) – The client to use for the request.
- Returns:
The host of the client.
- Return type:
str
- gazu.client.get_message_from_response(response: Response, default_message: str = 'No additional information') str[source]
A utility function that handles Zou’s inconsistent message keys. For a given request, checks if any error messages or regular messages were given and returns their value. If no messages are found, returns a default message.
- Parameters:
response – requests.Response - A response to check.
default_message – str - An optional default value to revert to if no message is detected.
- Returns:
The message to display to the user.
- Return type:
str
- gazu.client.host_is_up(client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) bool[source]
Check if the host is up.
- Parameters:
client (KitsuClient) – The client to use for the request.
- Returns:
True if the host is up.
- Return type:
bool
- gazu.client.host_is_valid(client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) bool[source]
Check if the host is valid by simulating a fake login.
- Parameters:
client (KitsuClient) – The client to use for the request.
- Returns:
True if the host is valid.
- Return type:
bool
- gazu.client.import_data(model_name: str, data: dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Import data for given model.
- Parameters:
model_name (str) – The data model to import.
data (dict) – The data to import.
client (KitsuClient) – The client to use for the request.
- Returns:
The imported data.
- Return type:
dict
- gazu.client.make_auth_header(client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[str, str][source]
Make headers required to authenticate.
- Parameters:
client (KitsuClient) – The client to use for the request.
- Returns:
Headers required to authenticate.
- Return type:
dict
- gazu.client.post(path: str, data: ~typing.Any, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) Any[source]
Run a post request toward given path for configured host.
- Parameters:
path (str) – The path to query.
data (Any) – The data to post.
client (KitsuClient) – The client to use for the request.
- Returns:
The request result.
- gazu.client.put(path: str, data: dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) Any[source]
Run a put request toward given path for configured host.
- Parameters:
path (str) – The path to query.
data (dict) – The data to put.
client (KitsuClient) – The client to use for the request.
- Returns:
The request result.
- gazu.client.set_event_host(new_host: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Set the host on which listening for events.
- Parameters:
new_host (str) – The new host to set.
client (KitsuClient) – The client to use for the request.
- Returns:
The new event host.
- Return type:
str
- gazu.client.set_host(new_host: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Set the host for the client.
- Parameters:
new_host (str) – The new host to set.
client (KitsuClient) – The client to use for the request.
- Returns:
The new host.
- Return type:
str
- gazu.client.set_tokens(new_tokens: dict[str, str], client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[str, str][source]
Store authentication token to reuse them for all requests.
- Parameters:
new_tokens (dict) – Tokens to use for authentication.
client (KitsuClient) – The client to use for the request.
- Returns:
The stored tokens.
- Return type:
dict
- gazu.client.update(model_name: str, model_id: str, data: dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Update an entry for given model, id and data.
- Parameters:
model_name (str) – The model type involved.
model_id (str) – The target model id.
data (dict) – The data to update.
client (KitsuClient) – The client to use for the request.
- Returns:
Updated entry
- Return type:
dict
- gazu.client.upload(path: str, file_path: str = None, data: dict = {}, extra_files: list = [], files: dict = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) Any[source]
Upload file located at file_path to given url path.
- Parameters:
path (str) – The url path to upload file.
file_path (str) – The file location on the hard drive.
data (dict) – The data to send with the file.
extra_files (list) – List of extra files to upload.
files (dict) – The dictionary of files to upload.
client (KitsuClient) – The client to use for the request.
- Returns:
Response from the API.
- Return type:
Any
gazu.concept
- gazu.concept.all_concepts(client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Returns:
All concepts from database.
- Return type:
list
- gazu.concept.all_concepts_for_project(project: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
project (str / dict) – The project dict or the project ID.
- Returns:
Concepts from database for the given project.
- Return type:
list
- gazu.concept.all_previews_for_concept(concept: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
concept (str / dict) – The concept dict or the concept ID.
- Returns:
Previews from database for given concept.
- Return type:
list
- gazu.concept.get_concept(concept_id: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
- Parameters:
concept_id (str) – ID of claimed concept.
- Returns:
Concept corresponding to given concept ID.
- Return type:
dict
- gazu.concept.get_concept_by_name(project: str | dict, concept_name: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict | None[source]
- Parameters:
project (str / dict) – The project dict or the project ID.
concept_name (str) – Name of claimed concept.
- Returns:
Concept corresponding to given name and project.
- Return type:
dict
- gazu.concept.new_concept(project: str | dict, name: str, description: str | None = None, data: dict = {}, entity_concept_links: list[str | dict] = [], client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Create a concept for given project. Allow to set metadata too.
- Parameters:
project (str / dict) – The project dict or the project ID.
name (str) – The name of the concept to create.
data (dict) – Free field to set metadata of any kind.
entity_concept_links (list) – List of entities to tag, as either ID strings or model dicts.
- Returns:
Created concept.
- gazu.concept.remove_concept(concept: str | dict, force: bool = False, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Remove the given Concept from the database.
If the Concept has tasks linked to it, this will by default mark the Concept as canceled. Deletion can be forced regardless of task links with the force parameter.
- Parameters:
concept (dict / str) – Concept to remove.
force (bool) – Whether to force the deletion of the concept.
- gazu.concept.update_concept(concept: dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Save given concept data into the API. Metadata are fully replaced by the ones set on given concept.
- Parameters:
concept (dict) – The concept dict to update.
- Returns:
Updated concept.
- Return type:
dict
gazu.context
- gazu.context.all_asset_types_for_project(project: str | dict, user_context: bool = False) list[dict][source]
Return the list of asset types for which the user has a task.
- gazu.context.all_assets_for_asset_type_and_project(project: str | dict, asset_type: str | dict, user_context: bool = False) list[dict][source]
Return the list of assets for given project and asset_type and for which the user has a task.
- gazu.context.all_assets_for_project(project: str | dict, user_context: bool = False) list[dict][source]
Return the list of assets for which the user has a task.
- gazu.context.all_episodes_for_project(project: str | dict, user_context: bool = False) list[dict][source]
Return the list of shots for given sequence and current user.
- gazu.context.all_open_projects(user_context: bool = False) list[dict][source]
Return the list of projects for which the user has a task.
- gazu.context.all_scenes_for_project(project: str | dict, user_context: bool = False) list[dict][source]
Return the list of scenes for given project and current user.
- gazu.context.all_scenes_for_sequence(sequence: str | dict, user_context: bool = False) list[dict][source]
Return the list of scenes for given sequence and current user.
- gazu.context.all_sequences_for_episode(episode: str | dict, user_context: bool = False) list[dict][source]
Return the list of shots for given sequence and current user.
- gazu.context.all_sequences_for_project(project: str | dict, user_context: bool = False) list[dict][source]
Return the list of sequences for given project and current user.
- gazu.context.all_shots_for_sequence(sequence: str | dict, user_context: bool = False) list[dict][source]
Return the list of shots for given sequence and current user.
- gazu.context.all_task_types_for_asset(asset: str | dict, user_context: bool = False) list[dict][source]
Return the list of tasks for given asset and current user.
- gazu.context.all_task_types_for_scene(scene: str | dict, user_context: bool = False) list[dict][source]
Return the list of tasks for given scene and current user.
gazu.edit
- gazu.edit.all_edits_for_project(project: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
project (str / dict) – The project dict or the project ID.
- Returns:
Edits from database or for given project.
- Return type:
list
- gazu.edit.all_previews_for_edit(edit: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
edit (str / dict) – The edit dict or the edit ID.
- Returns:
Previews from database for given edit.
- Return type:
list
- gazu.edit.get_edit(edit_id: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
- Parameters:
edit_id (str) – ID of claimed edit.
- Returns:
Edit corresponding to given edit ID.
- Return type:
dict
- gazu.edit.get_edit_by_name(project: str | dict, edit_name: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict | None[source]
- Parameters:
project (str / dict) – The project dict or the project ID.
edit_name (str) – Name of claimed edit.
- Returns:
Edit corresponding to given name and sequence.
- Return type:
dict
- gazu.edit.get_edit_url(edit: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
- Parameters:
edit (str / dict) – The edit dict or the edit ID.
- Returns:
Web url associated to the given edit
- Return type:
url (str)
- gazu.edit.new_edit(project: str | dict, name: str, description: str | None = None, data: dict = {}, episode: str | dict | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Create an edit for given project (and episode if given). Allow to set metadata too.
- Parameters:
project (str / dict) – The project dict or the project ID.
name (str) – The name of the edit to create.
description (str) – The description of the edit to create.
data (dict) – Free field to set metadata of any kind.
episode (str / dict) – The episode dict or the episode ID.
- Returns:
Created edit.
- gazu.edit.remove_edit(edit: str | dict, force: bool = False, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Remove given edit from database.
If the Edit has tasks linked to it, this will by default mark the Edit as canceled. Deletion can be forced regardless of task links with the force parameter.
- Parameters:
edit (str / dict) – Edit to remove.
force (bool) – Whether to force deletion of the edit regardless of whether it has links to tasks.
- gazu.edit.update_edit(edit: dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Save given edit data into the API. Metadata are fully replaced by the ones set on given edit.
- Parameters:
edit (dict) – The edit dict to update.
- Returns:
Updated edit.
- Return type:
dict
- gazu.edit.update_edit_data(edit: str | dict, data: dict = {}, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Update the metadata for the provided edit. Keys that are not provided are not changed.
- Parameters:
edit (str / dict) – The edit dict or ID to save in database.
data (dict) – Free field to set metadata of any kind.
- Returns:
Updated edit.
- Return type:
dict
gazu.entity
- gazu.entity.all_entities(client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Returns:
Retrieve all entities
- Return type:
list
- gazu.entity.all_entities_with_tasks_linked_to_entity(entity: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
entity (str / dict) – Entity to get linked entities.
- Returns:
Retrieve all entities linked to given entity.
- Return type:
list
- gazu.entity.all_entity_types(client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Returns:
Entity types listed in database.
- Return type:
list
- gazu.entity.get_entity(entity_id: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
- Parameters:
entity_id (str) – ID of claimed entity.
- Returns:
Retrieve entity matching given ID (it can be an entity of any kind: asset, shot, sequence, episode, etc).
- Return type:
dict
- gazu.entity.get_entity_by_name(entity_name: str, project: str | dict | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict | None[source]
- Parameters:
entity_name (str) – The name of the claimed entity.
project (str / dict) – Project ID or dict.
- Returns:
Retrieve entity matching given name (and project if given).
- gazu.entity.get_entity_type(entity_type_id: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
- Parameters:
entity_type_id (str) – ID of claimed entity type.
- Returns:
Retrieve entity type matching given ID (It can be an entity type of any kind).
- gazu.entity.get_entity_type_by_name(entity_type_name: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict | None[source]
- Parameters:
entity_type_name (str) – The name of the claimed entity type
- Returns:
Retrieve entity type matching given name.
- gazu.entity.guess_from_path(project_id: str, path: str, sep: str = '/') list[dict][source]
Get list of possible project file tree templates matching a file path and data ids corresponding to template tokens.
- Parameters:
project_id (str) – Project id of given file
path (str) – Path to a file
sep (str) – File path separator, defaults to “/”
- Returns:
dictionaries with the corresponding entities and template name.
- Return type:
list
- gazu.entity.new_entity_type(name: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Creates an entity type with the given name.
- Parameters:
name (str) – The name of the entity type
- Returns:
The created entity type
- Return type:
dict
- Raises:
gazu.exception.ParameterException – If an entity type with that name already exists.
- gazu.entity.remove_entity(entity: str | dict, force: bool = False, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Remove given entity from database.
If the Entity has tasks linked to it, this will by default mark the Entity as canceled. Deletion can be forced regardless of task links with the force parameter.
- Parameters:
entity (dict) – Entity to remove.
force (bool) – Whether to force deletion of the entity regardless of whether it has links to tasks.
gazu.events
- gazu.events.add_listener(event_client: Client, event_name: str, event_handler: Callable) Client[source]
Set a listener that reacts to a given event.
gazu.exceptions
- exception gazu.exception.DownloadFileException[source]
Error raised when a file can’t be downloaded.
- exception gazu.exception.FileDoesntExistException[source]
Error raised when a file should be existed when we submit a preview.
- exception gazu.exception.MethodNotAllowedException[source]
Error raised when a 405 error (method not handled) is sent by the API.
- exception gazu.exception.NotAllowedException[source]
Error raised when a 403 error (not authorized) is sent by the API.
- exception gazu.exception.NotAuthenticatedException[source]
Error raised when a 401 error (not authenticated) is sent by the API.
- exception gazu.exception.ParameterException[source]
Error raised when a 400 error (argument error) is sent by the API.
- exception gazu.exception.ProjectDoesntExistException[source]
Error raised when a project isn’t available.
- exception gazu.exception.RouteNotFoundException[source]
Error raised when a 404 error (not found) is sent by the API.
- exception gazu.exception.ServerErrorException[source]
Error raised when a 500 error (server error) is sent by the API.
- exception gazu.exception.TaskMustBeADictException[source]
Error raised when a task should be a dict.
- exception gazu.exception.TaskStatusNotFoundException[source]
Error raised when a task status is not found.
gazu.files
- gazu.files.all_output_files_for_asset_instance(asset_instance: str | dict, temporal_entity: str | dict | None = None, task_type: str | dict | None = None, output_type: str | dict | None = None, name: str | None = None, representation: str | None = None, file_status: str | dict | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
asset_instance (str / dict) – The instance dict or ID.
temporal_entity (str / dict) – Shot dict or ID (or scene or sequence).
task_type (str / dict) – The task type dict or ID.
output_type (str / dict) – The output_type dict or ID.
name (str) – The file name
representation (str) – The file representation
file_status (str / dict) – The file status
- Returns:
Output files for a given asset instance, temporal entity, output type, task_type, name and representation
- Return type:
list
- gazu.files.all_output_files_for_entity(entity: str | dict, output_type: str | dict | None = None, task_type: str | dict | None = None, name: str | None = None, representation: str | None = None, file_status: str | dict | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
entity (str / dict) – The entity dict or ID.
output_type (str / dict) – The output type dict or ID.
task_type (str / dict) – The task type dict or ID.
name (str) – The file name
representation (str) – The file representation
file_status (str / dict) – The file status
- Returns:
Output files for a given entity (asset or shot), output type, task_type, name and representation
- Return type:
list
- gazu.files.all_output_files_for_project(project: str | dict, output_type: str | dict | None = None, task_type: str | dict | None = None, name: str | None = None, representation: str | None = None, file_status: str | dict | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
project (str / dict) – The project dict or ID.
output_type (str / dict) – The output type dict or ID.
task_type (str / dict) – The task type dict or ID.
name (str) – The file name
representation (str) – The file representation
file_status (str / dict) – The file status
- Returns:
Output files for a given project (asset or shot), output type, task_type, name and representation
- Return type:
list
- gazu.files.all_output_types(client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Returns:
Output types listed in database.
- Return type:
list
- gazu.files.all_output_types_for_asset_instance(asset_instance: dict, temporal_entity: dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Returns:
Output types for given asset instance and entity (shot or scene).
- Return type:
list
- gazu.files.all_output_types_for_entity(entity: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
entity (str / dict) – The entity dict or the entity ID.
- Returns:
All output types linked to output files for given entity.
- Return type:
list
- gazu.files.all_softwares(client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Returns:
Software versions listed in database.
- Return type:
list[dict]
- gazu.files.build_asset_instance_output_file_path(asset_instance: str | dict, temporal_entity: str | dict, output_type: str | dict, task_type: str | dict, name: str = 'main', representation: str = '', mode: str = 'output', revision: int = 0, nb_elements: int = 1, sep: str = '/', client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
From the file path template configured at the project level and arguments, it builds a file path location where to store related DCC output file.
- Parameters:
entity (temporal) – Asset instance for which a file
required. (is)
entity – Temporal entity scene or shot in which
appeared. (the asset instance)
output_type (str / dict) – Output type of the generated file.
task_type (str / dict) – Task type related to output file.
name (str) – Additional suffix for the working file name.
representation (str) – Allow to select a template inside the template.
mode (str) – Allow to select a template inside the template.
revision (int) – File revision.
nb_elements (str) – To represent an image sequence, the amount of file is needed.
sep (str) – OS separator.
- Returns:
Generated output file path for given asset instance, task type and output type (without extension).
- gazu.files.build_entity_output_file_path(entity: str | dict, output_type: str | dict, task_type: str | dict, name: str = 'main', mode: str = 'output', representation: str = '', revision: int = 0, nb_elements: int = 1, sep: str = '/', client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
From the file path template configured at the project level and arguments, it builds a file path location where to store related DCC output file.
- Parameters:
entity (str / dict) – Entity for which an output file is needed.
output_type (str / dict) – Output type of the generated file.
task_type (str / dict) – Task type related to output file.
name (str) – Additional suffix for the working file name.
mode (str) – Allow to select a template inside the template.
representation (str) – Allow to select a template inside the template.
revision (int) – File revision.
nb_elements (int) – To represent an image sequence, the amount of file is needed.
sep (str) – OS separator.
- Returns:
Generated output file path for given entity, task type and output type (without extension).
- gazu.files.build_working_file_path(task: str | dict, name: str = 'main', mode: str = 'working', software: str | dict | None = None, revision: int = 1, sep: str = '/', client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
From the file path template configured at the project level and arguments, it builds a file path location where to store related DCC file.
- Parameters:
task (str / dict) – Task related to working file.
name (str) – Additional suffix for the working file name.
mode (str) – Allow to select a template inside the template.
software (str / dict) – Software at the origin of the file.
revision (int) – File revision.
sep (str) – OS separator.
- Returns:
Generated working file path for given task (without extension).
- gazu.files.download_attachment_file(attachment_file: str | dict, file_path: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) Response[source]
Download given attachment file and save it at given location.
- Parameters:
attachment_file (str / dict) – The attachment file dict or ID.
file_path (str) – Location on hard drive where to save the file.
- gazu.files.download_attachment_thumbnail(attachment_file: str | dict, file_path: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) Response[source]
Download the attachment file thumbnail.
- Parameters:
attachment_file (str / dict) – The attachment file dict or ID.
file_path (str) – Location on hard drive where to save the file.
- Returns:
Response object from the download request.
- Return type:
requests.Response
- gazu.files.download_organisation_avatar(organisation: str | dict, file_path: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) Response[source]
Download given organisation’s avatar and save it at given location.
- Parameters:
organisation (str / dict) – The organisation dict or ID.
file_path (str) – Location on hard drive where to save the file.
- gazu.files.download_person_avatar(person: str | dict, file_path: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) Response[source]
Download given person’s avatar and save it at given location.
- Parameters:
person (str / dict) – The person dict or ID.
file_path (str) – Location on hard drive where to save the file.
- gazu.files.download_preview_file(preview_file: str | dict, file_path: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) Response[source]
Download given preview file and save it at given location.
- Parameters:
preview_file (str / dict) – The preview file dict or ID.
file_path (str) – Location on hard drive where to save the file.
- gazu.files.download_preview_file_cover(preview_file: str | dict, file_path: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) Response[source]
Download given preview file cover and save it at given location. :param preview_file: The preview file dict or ID. :type preview_file: str / dict :param file_path: Location on hard drive where to save the file. :type file_path: str
- gazu.files.download_preview_file_thumbnail(preview_file: str | dict, file_path: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) Response[source]
Download given preview file thumbnail and save it at given location.
- Parameters:
preview_file (str / dict) – The preview file dict or ID.
file_path (str) – Location on hard drive where to save the file.
- gazu.files.download_preview_lowdef_movie(preview_file: str | dict, file_path: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) Response[source]
Download the low-definition preview movie file.
- Parameters:
preview_file (str / dict) – The preview file dict or ID.
file_path (str) – Location on hard drive where to save the file.
- Returns:
Response object from the download request.
- Return type:
requests.Response
- gazu.files.download_preview_movie(preview_file: str | dict, file_path: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) Response[source]
Download the preview movie file.
- Parameters:
preview_file (str / dict) – The preview file dict or ID.
file_path (str) – Location on hard drive where to save the file.
- Returns:
Response object from the download request.
- Return type:
requests.Response
- gazu.files.download_project_avatar(project: str | dict, file_path: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) Response[source]
Download given project’s avatar and save it at given location.
- Parameters:
project (str / dict) – The project dict or ID.
file_path (str) – Location on hard drive where to save the file.
- gazu.files.download_working_file(working_file: str | dict, file_path: str | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) Response[source]
Download given working file and save it at given location.
- Parameters:
working_file (str / dict) – The working file dict or ID.
file_path (str) – Location on hard drive where to save the file.
- gazu.files.extract_frame_from_preview(preview_file: str | dict, frame_number: int, file_path: str | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) Response[source]
Extract a specific frame from a preview file.
- Parameters:
preview_file (str / dict) – The preview file dict or ID.
frame_number (int) – The frame number to extract.
file_path (str) – Optional location on hard drive where to save the frame. If not provided, returns the response without saving.
- Returns:
Response object containing the extracted frame.
- Return type:
requests.Response
- gazu.files.extract_tile_from_preview(preview_file: str | dict, file_path: str | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) Response[source]
Extract a tile from a preview file.
- Parameters:
preview_file (str / dict) – The preview file dict or ID.
file_path (str) – Optional location on hard drive where to save the tile. If not provided, returns the response without saving.
- Returns:
Response object containing the extracted tile.
- Return type:
requests.Response
- gazu.files.get_all_attachment_files_for_project(project: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Retrieves all the attachment files for a given project.
- Parameters:
project (str / dict) – Target project, as ID string or model dict.
- Returns:
Attachment files for the project.
- Return type:
list
- gazu.files.get_all_attachment_files_for_task(task: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Retrieves all the attachment files for a given task.
- Parameters:
task (str / dict) – Target task, as ID string or model dict.
- gazu.files.get_all_preview_files_for_task(task: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Retrieves all the preview files for a given task.
- Parameters:
task (str / dict) – Target task, as ID string or model dict.
- gazu.files.get_all_working_files_for_entity(entity: str | dict, task: str | dict | None = None, name: str | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Retrieves all the working files of a given entity and specied parameters
- gazu.files.get_attachment_file(attachment_file_id: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Return attachment file object corresponding to given ID.
- Parameters:
attachment_file_id (str) – The attachment file ID.
- gazu.files.get_attachment_thumbnail_url(attachment_file: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Get the URL for the attachment file thumbnail.
- Parameters:
attachment_file (str / dict) – The attachment file dict or ID.
- Returns:
URL to the attachment thumbnail.
- Return type:
str
- gazu.files.get_file_status(status_id: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Return file status object corresponding to given ID.
- Parameters:
status_id (str) – The files status ID.
- gazu.files.get_file_status_by_name(name: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict | None[source]
Return file status object corresponding to given name
- Parameters:
name (str) – The files status name.
- gazu.files.get_last_asset_instance_output_revision(asset_instance: str | dict, temporal_entity: str | dict, output_type: str | dict, task_type: str | dict, name: str = 'master', client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) int[source]
Generate last output revision for given asset instance.
- gazu.files.get_last_entity_output_revision(entity: str | dict, output_type: str | dict, task_type: str | dict, name: str = 'master', client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) int[source]
- Parameters:
entity (str / dict) – The entity dict or ID.
output_type (str / dict) – The entity dict or ID.
task_type (str / dict) – The entity dict or ID.
name (str) – The output name
- Returns:
Last revision of ouput files for given entity, output type and task type.
- Return type:
int
- gazu.files.get_last_output_files_for_asset_instance(asset_instance: str | dict, temporal_entity: str | dict, task_type: str | dict | None = None, output_type: str | dict | None = None, name: str | None = None, representation: str | None = None, file_status: str | dict | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
asset_instance (str / dict) – The asset instance dict or ID.
temporal_entity (str / dict) – The temporal entity dict or ID.
output_type (str / dict) – The output type dict or ID.
task_type (str / dict) – The task type dict or ID.
name (str) – The file name
representation (str) – The file representation
file_status (str / dict) – The file status
- Returns:
last output files for given asset instance and temporal entity where it appears.
- Return type:
list
- gazu.files.get_last_output_files_for_entity(entity: str | dict, output_type: str | dict | None = None, task_type: str | dict | None = None, name: str | None = None, representation: str | None = None, file_status: str | dict | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
entity (str / dict) – The entity dict or ID.
output_type (str / dict) – The output type dict or ID.
task_type (str / dict) – The task type dict or ID.
name (str) – The file name
representation (str) – The file representation
file_status (str / dict) – The file status
- Returns:
Last output files for a given entity (asset or shot), output type, task_type, name and representation
- Return type:
list
- gazu.files.get_last_working_file_revision(task: str | dict, name: str = 'main', client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
- Parameters:
task (str / dict) – The task dict or the task ID.
name (str) – File name suffix (optional)
- Returns:
Last revisions stored in the API for given task and given file name suffix.
- Return type:
dict
- gazu.files.get_last_working_files(task: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
- Parameters:
task (str / dict) – The task dict or the task ID.
- Returns:
Keys are working file names and values are last working file availbable for given name.
- Return type:
dict
- gazu.files.get_next_asset_instance_output_revision(asset_instance: str | dict, temporal_entity: str | dict, output_type: str | dict, task_type: str | dict, name: str = 'master', client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) int[source]
- Parameters:
asset_instance (str / dict) – The asset instance dict or ID.
temporal_entity (str / dict) – The temporal entity dict or ID.
output_type (str / dict) – The entity dict or ID.
task_type (str / dict) – The entity dict or ID.
- Returns:
Next revision of ouput files available for given asset insance temporal entity, output type and task type.
- Return type:
int
- gazu.files.get_next_entity_output_revision(entity: str | dict, output_type: str | dict, task_type: str | dict, name: str = 'main', client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) int[source]
- Parameters:
entity (str / dict) – The entity dict or ID.
output_type (str / dict) – The entity dict or ID.
task_type (str / dict) – The entity dict or ID.
name (str) – Get version for output file with the given name.
- Returns:
Next revision of output files available for given entity, output type and task type.
- Return type:
int
- gazu.files.get_output_file(output_file_id: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
- Parameters:
output_file_id (str) – ID of claimed output file.
- Returns:
Output file matching given ID.
- Return type:
dict
- gazu.files.get_output_file_by_path(path: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict | None[source]
- Parameters:
path (str) – Path of claimed output file.
- Returns:
Output file matching given path, or None if there are no matches.
- Return type:
dict
- gazu.files.get_output_type(output_type_id: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
- Parameters:
output_type_id (str) – ID of claimed output type.
- Returns:
Output type matching given ID.
- Return type:
dict
- gazu.files.get_output_type_by_name(output_type_name: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict | None[source]
- Parameters:
output_type_name (str) – name of claimed output type.
- Returns:
Output type matching given name.
- Return type:
dict
- gazu.files.get_preview_file(preview_file_id: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
- Parameters:
preview_file_id (str) – ID of claimed preview file.
- Returns:
Preview file corresponding to given ID.
- Return type:
dict
- gazu.files.get_preview_file_url(preview_file: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Return given preview file URL
- Parameters:
preview_file (str / dict) – The preview file dict or ID.
- gazu.files.get_preview_lowdef_movie_url(preview_file: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Get the URL for the low-definition preview movie file.
- Parameters:
preview_file (str / dict) – The preview file dict or ID.
- Returns:
URL to the low-definition preview movie file.
- Return type:
str
- gazu.files.get_preview_movie_url(preview_file: str | dict, lowdef: bool = False, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Get the URL for the preview movie file.
- Parameters:
preview_file (str / dict) – The preview file dict or ID.
lowdef (bool) – If True, returns the low-definition version URL. If False, returns the original/high-definition version URL.
- Returns:
URL to the preview movie file.
- Return type:
str
- gazu.files.get_running_preview_files(client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Get all preview files currently being processed.
- Returns:
Preview files that are currently running/processing.
- Return type:
list
- gazu.files.get_software(software_id: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
- Parameters:
software_id (str) – ID of claimed output type.
- Returns:
Software object corresponding to given ID.
- Return type:
dict
- gazu.files.get_software_by_name(software_name: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict | None[source]
- Parameters:
software_name (str) – Name of claimed output type.
- Returns:
Software object corresponding to given name.
- Return type:
dict
- gazu.files.get_working_file(working_file_id: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
- Parameters:
working_file_id (str) – ID of claimed working file.
- Returns:
Working file corresponding to given ID.
- Return type:
dict
- gazu.files.get_working_files_for_task(task: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
task (str / dict) – The task dict or the task ID.
- Returns:
Working files related to given task.
- Return type:
list
- gazu.files.new_asset_instance_output_file(asset_instance: str | dict, temporal_entity: str | dict, output_type: str | dict, task_type: str | dict, comment: str, name: str = 'master', mode: str = 'output', working_file: str | dict | None = None, person: str | dict | None = None, revision: int = 0, nb_elements: int = 1, representation: str = '', sep: str = '/', file_status_id: str | dict | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Create a new output file for given asset instance, temporal entity, task type and output type. It generates and store the expected path and sets a revision number (last revision + 1).
- Parameters:
asset_instance (str / dict) – Asset instance for which an output file is needed.
temporal_entity (str / dict) – Temporal entity for which an output file is needed.
output_type (str / dict) – Output type of the generated file.
task_type (str / dict) – Task type related to output file.
comment (str) – Comment related to created revision.
working_file (str / dict) – Working file which is the source of the generated file.
person (str / dict) – Author of the file.
name (str) – Additional suffix for the working file name.
mode (str) – Allow to select a template inside the template.
revision (int) – File revision.
nb_elements (int) – To represent an image sequence, the amount of file needed.
representation (str) – Differentiate file extensions. It can be useful to build folders based on extensions like abc, jpg, cetc.
sep (str) – OS separator.
file_status_id (id) – The id of the file status to set at creation
- Returns:
Created output file.
- gazu.files.new_entity_output_file(entity: str | dict, output_type: str | dict, task_type: str | dict, comment: str, working_file: str | dict | None = None, person: str | dict | None = None, name: str = 'main', mode: str = 'output', revision: int = 0, nb_elements: int = 1, representation: str = '', sep: str = '/', file_status_id: str | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Create a new output file for given entity, task type and output type. It generates and store the expected path and sets a revision number (last revision + 1).
- Parameters:
entity (str / dict) – Entity for which an output file is needed.
output_type (str / dict) – Output type of the generated file.
task_type (str / dict) – Task type related to output file.
comment (str) – Comment related to created revision.
working_file (str / dict) – Working file which is the source of the
file. (generated)
person (str / dict) – Author of the file.
name (str) – Additional suffix for the working file name.
mode (str) – Allow to select a template inside the template.
revision (int) – File revision.
nb_elements (int) – To represent an image sequence, the amount of file is needed.
representation (str) – Differientate file extensions. It can be useful
abc (to build folders based on extensions like)
jpg
etc.
sep (str) – OS separator.
file_status_id (id) – The id of the file status to set at creation
- Returns:
Created output file.
- Return type:
dict
- gazu.files.new_file_status(name: str, color: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Create a new file status if not existing yet.
If the file status already exists, the existing record will be returned.
- Parameters:
name (str) – the name of the status to create.
color (str) – The color for the status as a Hex string, e.g “#00FF00”.
- gazu.files.new_output_type(name: str, short_name: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Create a new output type in database.
- Parameters:
name (str) – Name of created output type.
short_name (str) – Name shorten to represente the type in UIs.
- Returns:
Created output type.
- Return type:
dict
- gazu.files.new_software(name: str, short_name: str, file_extension: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Create a new software in datatabase.
- Parameters:
name (str) – Name of created software.
short_name (str) – Short representation of software name (for UIs).
file_extension (str) – Main file extension generated by given software.
- Returns:
Created software.
- Return type:
dict
- gazu.files.new_working_file(task: str | dict, name: str = 'main', mode: str = 'working', software: str | dict | None = None, comment: str = '', person: str | dict | None = None, revision: int = 0, sep: str = '/', client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Create a new working_file for given task. It generates and store the expected path for given task and options. It sets a revision number (last revision + 1).
- Parameters:
task (str / dict) – Task related to working file.
name (str) – Additional suffix for the working file name.
mode (str) – Allow to select a template inside the template.
software (str / dict) – Software at the origin of the file.
comment (str) – Comment related to created revision.
person (str / dict) – Author of the file.
revision (int) – File revision.
sep (str) – OS separator.
- Returns:
Created working file.
- gazu.files.remove_preview_file(preview_file: str | dict, force: bool = False, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Remove given preview file from database.
Depending on the configuration of the Kitsu server, the stored files linked to the preview file may or may not be removed on deletion of a preview file. The force=True parameter can be used to force deletion of the files regardless of server config.
- Parameters:
preview_file (str / dict) – The preview_file dict or ID.
force (bool) – Whether to force deletion of the files linked to the preview file in storage.
- gazu.files.set_project_file_tree(project: str | dict, file_tree_name: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
(Deprecated) Set given file tree template on given project. This template will be used to generate file paths. The template is selected from sources. It is found by using given name.
- Parameters:
project (str / dict) – The project file dict or ID.
- Returns:
Modified project.
- Return type:
dict
- gazu.files.update_comment(working_file: str | dict, comment: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Update the file comment in database for given working file.
- Parameters:
working_file (str / dict) – The working file dict or ID.
- Returns:
Modified working file
- Return type:
dict
- gazu.files.update_modification_date(working_file: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Update modification date of given working file with current time (now).
- Parameters:
working_file (str / dict) – The working file dict or ID.
- Returns:
Modified working file
- Return type:
dict
- gazu.files.update_output_file(output_file: str | dict, data: dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Update the data of given output file.
- Parameters:
output_file (str / dict) – The output file dict or ID.
data (dict) – Data to update on the output file.
- Returns:
Modified output file
- Return type:
dict
- gazu.files.update_preview(preview_file: str | dict, data: dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Update the data of given preview file.
- Parameters:
preview_file (str / dict) – The preview file dict or ID.
data (dict) – Data to update on the prevew file.
- Returns:
Modified preview file
- Return type:
dict
- gazu.files.update_preview_annotations(preview_file: str | dict, additions: list[dict] | None = None, updates: list[dict] | None = None, deletions: list[str] | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Update annotations on a preview file.
Allow to modify the annotations stored at the preview level. Modifications are applied via three fields: additions to give all the annotations that need to be added, updates that list annotations that need to be modified, and deletions to list the IDs of annotations that need to be removed.
- Parameters:
preview_file (str / dict) – The preview file dict or ID.
additions (list[dict]) – Annotations to add. Each annotation should be a dict with properties like ‘x’, ‘y’, ‘type’, etc. Example: [{“x”: 100, “y”: 200, “type”: “drawing”}]
updates (list[dict]) – Annotations to update. Each annotation should include an ‘id’ field along with the fields to update. Example: [{“id”: “uuid”, “x”: 150, “y”: 250}]
deletions (list[str]) – Annotation IDs to remove. Example: [“a24a6ea4-ce75-4665-a070-57453082c25”]
- Returns:
Updated preview file with the updated annotations array.
- Return type:
dict
- gazu.files.update_preview_position(preview_file: str | dict, position: float, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Update the position of a preview file (the displayed order for a single revision).
- Parameters:
preview_file (str / dict) – The preview file dict or ID.
position (float) – The new position value.
- Returns:
Updated preview file.
- Return type:
dict
- gazu.files.update_project_file_tree(project: str | dict, file_tree: dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Set given dict as file tree template on given project. This template will be used to generate file paths.
- Parameters:
project (str / dict) – The project dict or ID.
file_tree (dict) – The file tree template to set on project.
- Returns:
Modified project.
- Return type:
dict
- gazu.files.upload_organisation_avatar(organisation: str | dict, file_path: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[Literal['thumbnail_path'], str][source]
Upload given file as organisation avatar.
- Parameters:
organisation (str / dict) – The organisation dict or ID.
file_path (str) – Path of the file to upload as avatar.
- Returns:
- Dictionary with a key of ‘thumbnail_path’ and a value of the
path to the static image file, relative to the host url.
- Return type:
dict
- gazu.files.upload_person_avatar(person: str | dict, file_path: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[Literal['thumbnail_path'], str][source]
Upload given file as person avatar.
- Parameters:
person (str / dict) – The person dict or the person ID.
file_path (str) – Path of the file to upload as avatar.
- Returns:
- Dictionary with a key of ‘thumbnail_path’ and a value of the
path to the static image file, relative to the host url.
- Return type:
dict
- gazu.files.upload_project_avatar(project: str | dict, file_path: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[Literal['thumbnail_path'], str][source]
Upload given file as project avatar.
- Parameters:
project (str / dict) – The project dict or ID.
file_path (str) – Path of the file to upload as avatar.
- Returns:
- Dictionary with a key of ‘thumbnail_path’ and a value of the
path to the static image file, relative to the host url.
- Return type:
dict
- gazu.files.upload_working_file(working_file: str | dict, file_path: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Save given file in working file storage.
- Parameters:
working_file (str / dict) – The working file dict or ID.
file_path (str) – Location on hard drive where to save the file.
- Returns:
the working file model dictionary.
- Return type:
(dict)
gazu.person
- gazu.person.add_person_to_department(person: str | dict, department: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Add a person to a department.
- Parameters:
person (str / dict) – The person dict or id.
department (str / dict) – The department dict or id.
- Returns:
Response information.
- Return type:
dict
- gazu.person.all_departments(client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Returns:
Departments listed in database.
- Return type:
list
- gazu.person.all_organisations(client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Returns:
Organisations listed in database.
- Return type:
list
- gazu.person.all_persons(client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Returns:
Persons listed in database.
- Return type:
list
- gazu.person.change_password_for_person(person: str | dict, password: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[Literal['success'], bool][source]
Change the password for given person.
- Parameters:
person (str / dict) – The person dict or the person ID.
password (str) – The new password.
- Returns:
success or not.
- Return type:
dict
- gazu.person.clear_person_avatar(person: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Clear avatar for a person.
- Parameters:
person (str / dict) – The person dict or id.
- Returns:
Request response object.
- Return type:
Response
- gazu.person.disable_two_factor_authentication(person: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Disable two factor authentication for a person.
- Parameters:
person (str / dict) – The person dict or id.
- Returns:
Request response object.
- Return type:
Response
- gazu.person.get_all_month_time_spents(id: str, date: ~datetime.date, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[source]
- Parameters:
id (str) – An uuid identifying a person.
date (datetime.date) – The date of the month to query.
- Returns:
All of the person’s time spents for the given month.
- Return type:
list
- gazu.person.get_day_offs(person: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Get day offs for a person.
- Parameters:
person (str / dict) – The person dict or id.
- Returns:
Day offs for the person.
- Return type:
list
- gazu.person.get_department(department_id: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
- Parameters:
department_id (str) – An uuid identifying a department.
- Returns:
Department corresponding to given department_id.
- Return type:
dict
- gazu.person.get_department_by_name(name: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict | None[source]
- Parameters:
name (str) – Department name.
- Returns:
Department corresponding to given name.
- Return type:
dict
- gazu.person.get_month_day_offs(person: str | dict, year: int, month: int, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Get day offs for a person for a specific month.
- Parameters:
person (str / dict) – The person dict or id.
year (int) – Year.
month (int) – Month number.
- Returns:
Day offs for the month.
- Return type:
list
- gazu.person.get_organisation(client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
- Returns:
Database information for organisation linked to auth tokens.
- Return type:
dict
- gazu.person.get_person(id: str, relations: bool = False, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict | None[source]
- Parameters:
id (str) – An uuid identifying a person.
relations (bool) – Whether to get the relations for the given person.
- Returns:
- Person corresponding to given id, or None if no Person exists
with that ID.
- Return type:
dict
- gazu.person.get_person_by_desktop_login(desktop_login: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict | None[source]
- Parameters:
desktop_login (str) – Login used to sign in on the desktop computer.
- Returns:
Person corresponding to given desktop computer login.
- Return type:
dict
- gazu.person.get_person_by_email(email: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict | None[source]
- Parameters:
email (str) – User’s email.
- Returns:
Person corresponding to given email.
- Return type:
dict
- gazu.person.get_person_by_full_name(full_name: str, first_name: str | None = None, last_name: str | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict | None[source]
- Parameters:
full_name (str) – User’s full name
first_name (str) – User’s first name
last_name (str) – User’s last name
- Returns:
Person corresponding to given name, or None if not found.
- Return type:
dict
- gazu.person.get_person_url(person: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
- Parameters:
person (str / dict) – The person dict or the person ID.
- Returns:
Web url associated to the given person
- Return type:
url (str)
- gazu.person.get_presence_log(year: int, month: int, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
- Parameters:
year (int) – The number of the year to fetch logs during.
month (int) – The index of the month to get presence logs for. Indexed from 1, e.g 1 = January, 2 = February, …
- Returns:
The presence log table (in CSV) for given month and year.
- Return type:
str
- gazu.person.get_time_spents_by_date(person: str | dict, date: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Get time spents for a person on a specific date.
- Parameters:
person (str / dict) – The person dict or id.
date (str) – Date in YYYY-MM-DD format.
- Returns:
Time spents for the date.
- Return type:
list
- gazu.person.get_time_spents_range(person_id: str, start_date: str, end_date: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[source]
Gets the time spents of the current user for the given date range.
- Parameters:
person_id (str) – An uuid identifying a person.
start_date (str) – The first day of the date range as a date string with the following format: YYYY-MM-DD
end_date (str) – The last day of the date range as a date string with the following format: YYYY-MM-DD
- Returns:
All of the person’s time spents
- Return type:
list
- gazu.person.get_week_day_offs(person: str | dict, year: int, week: int, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Get day offs for a person for a specific week.
- Parameters:
person (str / dict) – The person dict or id.
year (int) – Year.
week (int) – Week number.
- Returns:
Day offs for the week.
- Return type:
list
- gazu.person.get_week_time_spents(person: str | dict, year: int, week: int, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Get time spents for a person for a specific week.
- Parameters:
person (str / dict) – The person dict or id.
year (int) – Year.
week (int) – Week number.
- Returns:
Time spents for the week.
- Return type:
list
- gazu.person.get_year_day_offs(person: str | dict, year: int, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Get day offs for a person for a specific year.
- Parameters:
person (str / dict) – The person dict or id.
year (int) – Year.
- Returns:
Day offs for the year.
- Return type:
list
- gazu.person.get_year_time_spents(person: str | dict, year: int, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Get time spents for a person for a specific year.
- Parameters:
person (str / dict) – The person dict or id.
year (int) – Year.
- Returns:
Time spents for the year.
- Return type:
list
- gazu.person.invite_person(person: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[str, str][source]
Sends an email to given person to invite him/her to connect to Kitsu.
- Parameters:
person (str / dict) – The person to invite.
- Returns:
Response dict with ‘success’ and ‘message’ keys.
- Return type:
dict
- gazu.person.new_bot(name: str, email: str, role: str = 'user', departments: list[str | dict] = [], active: bool = True, expiration_date: str | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Create a new bot based on given parameters. His access token will be in the return dict.
- Parameters:
name (str) – the name of the bot.
email (str) – the email of the bot.
role (str) – user, manager, admin (which match CG artist, Supervisor and studio manager)
departments (list) – The departments for the person.
active (bool) – Whether the person is active or not.
expiration_date (str) – The expiration date for the bot.
- Returns:
Created bot.
- Return type:
dict
- gazu.person.new_department(name: str, color: str = '', archived: bool = False, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Create a new department based on given parameters.
- Parameters:
name (str) – the name of the department.
color (str) – the color of the department as a Hex string, e.g “#00FF00”.
archived (bool) – Whether the department is archived or not.
- Returns:
Created department.
- Return type:
dict
- gazu.person.new_person(first_name: str, last_name: str, email: str, phone: str = '', role: str = 'user', desktop_login: str = '', departments: list[str | dict] = [], password: str | None = None, active: bool = True, contract_type: str = 'open-ended', client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Create a new person based on given parameters. His/her password will is set automatically to default.
- Parameters:
first_name (str) – the first name of the person.
last_name (str) – the last name of the person.
email (str) – the email of the person.
phone (str) – the phone number of the person.
role (str) – user, manager, admin (which match CG artist, Supervisor and studio manager)
desktop_login (str) – The login the users uses to log on its computer.
departments (list) – The departments for the person.
password (str) – The password for the person.
active (bool) – Whether the person is active or not.
- Returns:
Created person.
- Return type:
dict
- gazu.person.remove_bot(bot: dict, force: bool = False, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Remove given bot from database.
- Parameters:
bot (dict) – Bot to remove.
- gazu.person.remove_department(department, force=False, client=<gazu.client.KitsuClient object>)[source]
Remove given department from database.
- Parameters:
department (dict / ID) – Department to remove.
force (bool) – Whether to force deletion of the department.
- gazu.person.remove_person(person: str, force: bool = False, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Remove given person from database.
- Parameters:
person (dict) – Person to remove.
- gazu.person.remove_person_from_department(person: str | dict, department: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Remove a person from a department.
- Parameters:
person (str / dict) – The person dict or id.
department (str / dict) – The department dict or id.
- Returns:
Request response object.
- Return type:
Response
- gazu.person.set_avatar(person: str | dict, file_path: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[Literal['thumbnail_path'], str][source]
Upload picture and set it as avatar for given person.
- Parameters:
person (str / dict) – The person dict or the person ID.
file_path (str) – Path where the avatar file is located on the hard drive.
- Returns:
- Dictionary with a key of ‘thumbnail_path’ and a value of the
path to the static image file, relative to the host url.
- Return type:
dict
- gazu.person.update_bot(bot: dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Update a bot.
- Parameters:
bot (dict) – The bot dict that needs to be upgraded.
- Returns:
The updated bot.
- Return type:
dict
gazu.playlist
- gazu.playlist.add_entity_to_playlist(playlist: dict, entity: str | dict, preview_file: str | dict | None = None, persist: bool = True, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Add an entity to the playlist, use the last uploaded preview as revision to review.
- Parameters:
playlist (dict) – Playlist object to modify.
entity (str / dict) – The entity to add or its ID.
preview_file (str / dict) – Set it to force a give revision to review.
persist (bool) – Set it to True to save the result to the API.
- Returns:
Updated playlist.
- Return type:
dict
- gazu.playlist.all_build_jobs_for_project(project: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Get all build jobs for a project.
- Parameters:
project (str / dict) – The project dict or id.
- Returns:
All build jobs for the project.
- Return type:
list
- gazu.playlist.all_playlists(client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Returns:
All playlists for all projects.
- Return type:
list
- gazu.playlist.all_playlists_for_episode(episode: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
episode (str / dict) – The episode dict or the episode ID.
- Returns:
All playlists for the given episode.
- Return type:
list
- gazu.playlist.all_playlists_for_project(project: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>, page: int = 1) list[dict][source]
- Parameters:
project (str / dict) – The project dict or the project ID.
page (int) – Page number for pagination
- Returns:
All playlists for the given project
- Return type:
list
- gazu.playlist.all_shots_for_playlist(playlist: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
playlist (str / dict) – The playlist dict or the playlist ID.
- Returns:
All shots linked to the given playlist
- Return type:
list
- gazu.playlist.build_playlist_movie(playlist: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Build a movie for a playlist.
- Parameters:
playlist (str / dict) – The playlist dict or id.
- Returns:
Build job information.
- Return type:
dict
- gazu.playlist.delete_playlist(playlist: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Delete a playlist.
- Parameters:
playlist (str / dict) – The playlist dict or id.
- Returns:
Request response object.
- Return type:
Response
- gazu.playlist.download_playlist_build(playlist: str | dict, build_job: str | dict, file_path: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) Response[source]
Download a playlist build.
- Parameters:
playlist (str / dict) – The playlist dict or id.
build_job (str / dict) – The build job dict or id.
file_path (str) – The location to store the file on the hard drive.
- Returns:
Request response object.
- Return type:
Response
- gazu.playlist.download_playlist_zip(playlist: str | dict, file_path: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) Response[source]
Download a playlist as a zip file.
- Parameters:
playlist (str / dict) – The playlist dict or id.
file_path (str) – The location to store the file on the hard drive.
- Returns:
Request response object.
- Return type:
Response
- gazu.playlist.generate_temp_playlist(project: str | dict, data: dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Generate a temporary playlist.
- Parameters:
project (str / dict) – The project dict or id.
data (dict) – Playlist generation data.
- Returns:
Generated temporary playlist.
- Return type:
dict
- gazu.playlist.get_build_job(build_job: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Get a build job.
- Parameters:
build_job (str / dict) – The build job dict or id.
- Returns:
Build job information.
- Return type:
dict
- gazu.playlist.get_entity_preview_files(entity: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[str, list[dict]][source]
Get all preview files grouped by task type for a given entity.
- Parameters:
entity (str / dict) – The entity to retrieve files from or its ID.
- Returns:
A dict where keys are task type IDs and value array of revisions.
- Return type:
dict
- gazu.playlist.get_entity_previews(playlist: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Get entity previews for a playlist.
- Parameters:
playlist (str / dict) – The playlist dict or id.
- Returns:
Entity previews for the playlist.
- Return type:
list
- gazu.playlist.get_playlist(playlist: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
- Parameters:
playlist (str / dict) – The playlist dict or the playlist ID.
- Returns:
playlist object for given id.
- Return type:
dict
- gazu.playlist.get_playlist_by_name(project: str | dict, name: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict | None[source]
- Parameters:
project (str / dict) – The project dict or the project ID.
name (str) – The playlist name
- Returns:
Playlist matching given name for given project.
- Return type:
dict
- gazu.playlist.new_playlist(project: str | dict, name: str, episode: str | dict | None = None, for_entity: ~typing.Literal['shot', 'asset', 'sequence'] = 'shot', for_client: bool = False, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Create a new playlist in the database for given project.
- Parameters:
project (str / dict) – The project dict or the project ID.
name (str) – Playlist name.
for_entity (str) – The type of entity to include in the playlist, can be one of “asset”, “sequence” or “shot”.
for_client (bool) – Whether the playlist should be shared with clients.
- Returns:
Created playlist.
- Return type:
dict
- gazu.playlist.notify_clients_playlist_ready(playlist: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Notify clients that a playlist is ready.
- Parameters:
playlist (str / dict) – The playlist dict or id.
- Returns:
Notification response.
- Return type:
dict
- gazu.playlist.remove_build_job(build_job: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Delete a build job.
- Parameters:
build_job (str / dict) – The build job dict or id.
- gazu.playlist.remove_entity_from_playlist(playlist: dict, entity: str | dict, persist: bool = True, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Remove all occurences of a given entity from a playlist.
- Parameters:
playlist (dict) – Playlist object to modify
entity (str / dict) – the entity to remove or its ID
persist (bool) – Set it to True to save the result to the API.
- Returns:
Updated playlist.
- Return type:
dict
- gazu.playlist.update_entity_preview(playlist: dict, entity: str | dict, preview_file: str | dict, persist: bool = True, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Update the preview file linked to a given entity in a playlist.
- Parameters:
playlist (dict) – Playlist object to modify.
entity (str / dict) – The entity to update the preview file for.
preview_file (str / dict) – The new preview file to set for the entity.
persist (bool) – Set it to True to save the result to the API.
- Returns:
Updated playlist.
- Return type:
dict
- gazu.playlist.update_playlist(playlist: dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Save given playlist data into the API. Metadata are fully replaced by the ones set on given playlist.
- Parameters:
playlist (dict) – The playlist dict to update.
- Returns:
Updated playlist.
- Return type:
dict
gazu.project
- gazu.project.add_metadata_descriptor(project: str | dict, name: str, entity_type: str, data_type: str = 'string', choices: list[str] = [], for_client: bool = False, departments: list[str | dict] = [], client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Create a new metadata descriptor for a project.
- Parameters:
project (dict / ID) – The project dict or id.
name (str) – The name of the metadata descriptor
entity_type (str) – asset, shot or scene.
choices (list) – A list of possible values, empty list for free values.
for_client (bool) – Wheter it should be displayed in Kitsu or not.
departments (list) – A list of departments dict or id.
- Returns:
Created metadata descriptor.
- Return type:
dict
- gazu.project.add_person_to_team(project: str | dict, person: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Add a person to the team project.
- Parameters:
project (dict / ID) – The project dict or id.
person (dict / ID) – The person dict or id.
- Returns:
The project dictionary.
- Return type:
dict
- gazu.project.add_preview_background_file(project: str | dict, background_file: dict[~typing.Literal['preview_background_file_id'], str], client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Add a preview background file to a project.
- The background_file payload must be a dict in the form:
{“preview_background_file_id”: <background file id>}
- Parameters:
project (dict / ID) – The project dict or id.
background_file (dict) – A dict with a key of “preview_background_file_id” and value of the ID of the preview background to add.
- Returns:
The project dictionary.
- Return type:
(dict)
- gazu.project.add_status_automation(project: str | dict, automation: dict[~typing.Literal['status_automation_id'], str], client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Add a status automation to the project.
- Parameters:
project (dict / ID) – The project dict or id.
automation (dict) – A dictionary with a key of “status_automation_id” and value of the automation ID.
- Returns:
The project dictionary.
- Return type:
dict
- gazu.project.all_metadata_descriptors(project: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Get all the metadata descriptors.
- Parameters:
project (dict / ID) – The project dict or id.
- Returns:
The metadata descriptors.
- Return type:
list
- gazu.project.all_open_projects(client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Returns:
Open projects stored in the database.
- gazu.project.all_project_status(client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Returns:
Project status listed in database.
- Return type:
list
- gazu.project.all_projects(client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Returns:
Projects stored in the database.
- Return type:
list
- gazu.project.all_status_automations(project: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Get status automations configured for a project.
- Parameters:
project (dict / ID) – The project dict or id.
- Returns:
The status automations.
- Return type:
list
- gazu.project.close_project(project: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Closes the provided project.
- Parameters:
project (dict / ID) – The project dict or id to save in database.
- Returns:
Updated project.
- Return type:
dict
- gazu.project.create_budget(project: str | dict, name: str, description: str | None = None, currency: str | None = None, start_date: str | None = None, end_date: str | None = None, amount: int | float | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Create a budget for a project.
- Parameters:
project (dict / ID) – The project dict or id.
name (str) – Budget name. Required.
description (str, optional) – Human description.
currency (str, optional) – Currency code (e.g. “USD”, “EUR”).
start_date (str, optional) – Start date ISO format (YYYY-MM-DD).
end_date (str, optional) – End date ISO format (YYYY-MM-DD).
amount (number, optional) – Overall budget amount.
- gazu.project.create_budget_entry(project: str | dict, budget: str | dict, name: str, date: str | None = None, amount: int | float | None = None, quantity: int | float | None = None, unit_price: int | float | None = None, description: str | None = None, category: str | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Create a budget entry for a specific budget.
- Parameters:
project (dict / ID) – The project dict or id.
budget (dict / ID) – The budget dict or id.
name (str) – Entry name. Required.
date (str, optional) – Entry date in ISO format (YYYY-MM-DD).
amount (number, optional) – Total amount for the entry.
quantity (number, optional) – Quantity used to compute amount.
unit_price (number, optional) – Unit price used with quantity.
description (str, optional) – Human description for the entry.
category (str, optional) – Category label for the entry.
- gazu.project.get_budget(project: str | dict, budget: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Get a specific budget.
- Parameters:
project (dict / ID) – The project dict or id.
budget (dict / ID) – The budget dict or id.
- gazu.project.get_budget_entries(project: str | dict, budget: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Get entries for a specific budget.
- Parameters:
project (dict / ID) – The project dict or id.
budget (dict / ID) – The budget dict or id.
- gazu.project.get_budget_entry(project: str | dict, budget: str | dict, entry: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Get a specific budget entry.
- Parameters:
project (dict / ID) – The project dict or id.
budget (dict / ID) – The budget dict or id.
entry (dict / ID) – The budget entry dict or id.
- gazu.project.get_budgets(project: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Get budgets for a project.
- Parameters:
project (dict / ID) – The project dict or id.
- gazu.project.get_metadata_descriptor(project: str | dict, metadata_descriptor_id: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Retrieve a the metadata descriptor matching given ID.
- Parameters:
project (dict / ID) – The project dict or id.
metadata_descriptor_id (dict / ID) – The metadata descriptor dict or id.
- Returns:
The metadata descriptor matching the ID.
- Return type:
dict
- gazu.project.get_metadata_descriptor_by_field_name(project: str | dict, field_name: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict | None[source]
Get a metadata descriptor matching the given project and name.
- Parameters:
project (dict / ID) – The project dict or id.
field_name (str) – The name of the metadata field.
- Returns:
The metadata descriptor matchind the ID.
- Return type:
dict
- gazu.project.get_milestones(project: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Get production milestones for a project.
- Parameters:
project (dict / ID) – The project dict or id.
- gazu.project.get_preview_background_files(project: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Get preview background files configured for a project.
- Parameters:
project (dict / ID) – The project dict or id.
- gazu.project.get_project(project_id: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
- Parameters:
project_id (str) – ID of claimed project.
- Returns:
Project corresponding to given id.
- Return type:
dict
- gazu.project.get_project_by_name(project_name: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict | None[source]
- Parameters:
project_name (str) – Name of claimed project.
- Returns:
Project corresponding to given name.
- Return type:
dict
- gazu.project.get_project_person_quotas(project: str | dict, person: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Get quotas for a person within a project.
- Parameters:
project (dict / ID) – The project dict or id.
person (dict / ID) – The person dict or id.
- gazu.project.get_project_quotas(project: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Get quotas for a project.
- Parameters:
project (dict / ID) – The project dict or id.
- gazu.project.get_project_status_by_name(project_status_name: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict | None[source]
- Parameters:
project_status_name (str) – Name of claimed project status.
- Returns:
Project status corresponding to given name.
- Return type:
dict
- gazu.project.get_project_task_statuses(project: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Get task statuses configured for a project.
- Parameters:
project (dict / ID) – The project dict or id.
- Returns:
The task statuses.
- Return type:
list
- gazu.project.get_project_task_types(project: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Get task types configured for a project.
- Parameters:
project (dict / ID) – The project dict or id.
- Returns:
The task types.
- Return type:
list
- gazu.project.get_project_url(project: str | dict, section: str = 'assets', client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
- Parameters:
project (str / dict) – The project dict or the project ID.
section (str) – The section we want to open in the browser.
- Returns:
Web url associated to the given project
- Return type:
url (str)
- gazu.project.get_team(project: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Get team for project.
- Parameters:
project (dict / ID) – The project dict or id.
- Returns:
The list of user dicts that are part of the project team.
- Return type:
list[dict]
- gazu.project.new_project(name: str, production_type: str = 'short', team: list = [], asset_types: list = [], task_statuses: list = [], task_types: list = [], production_style: str = '2d3d', client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Creates a new project.
- Parameters:
name (str) – Name of the project to create.
production_type (str) – short, featurefilm, tvshow.
team (list) – Team of the project.
asset_types (list) – Asset types of the project.
task_statuses (list) – Task statuses of the project.
task_types (list) – Task types of the project.
production_style (str) – 2d, 3d, 2d3d, ar, vfx, stop-motion, motion-design, archviz, commercial, catalog, immersive, nft, video-game, vr.
- Returns:
Created project.
- Return type:
dict
- gazu.project.remove_budget(project: str | dict, budget: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Delete a specific budget.
- Parameters:
project (dict / ID) – The project dict or id.
budget (dict / ID) – The budget dict or id.
- gazu.project.remove_budget_entry(project: str | dict, budget: str | dict, entry: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Delete a specific budget entry.
- Parameters:
project (dict / ID) – The project dict or id.
budget (dict / ID) – The budget dict or id.
entry (dict / ID) – The budget entry dict or id.
- gazu.project.remove_metadata_descriptor(project: str | dict, metadata_descriptor_id: str | dict, force: bool = False, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Remove a metadata descriptor.
- Parameters:
project (dict / ID) – The project dict or id.
metadata_descriptor_id (dict / ID) – The metadata descriptor dict or id.
- gazu.project.remove_person_from_team(project: str | dict, person: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Remove a person from the team project.
- Parameters:
project (dict / ID) – The project dict or id.
person (dict / ID) – The person dict or id.
- gazu.project.remove_preview_background_file(project: str | dict, background_file: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Remove a preview background file from a project.
- Parameters:
project (dict / ID) – The project dict or id.
background_file (dict / ID) – The background file dict or id.
- gazu.project.remove_project(project: str | dict, force: bool = False, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Remove given project from database. (Prior to do that, make sure, there is no asset or shot left).
- Parameters:
project (dict / str) – Project to remove.
- gazu.project.remove_status_automation(project: str | dict, automation: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Remove a status automation from the project.
- Parameters:
project (dict / ID) – The project dict or id.
automation (dict / ID) – The automation dict or id.
- gazu.project.update_budget(project: str | dict, budget: str | dict, data: dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Update a specific budget.
- Parameters:
project (dict / ID) – The project dict or id.
budget (dict / ID) – The budget dict or id.
data (dict) – The updated budget payload.
- gazu.project.update_budget_entry(project: str | dict, budget: str | dict, entry: str | dict, data: dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Update a specific budget entry.
- Parameters:
project (dict / ID) – The project dict or id.
budget (dict / ID) – The budget dict or id.
entry (dict / ID) – The budget entry dict or id.
data (dict) – The updated budget entry payload.
- gazu.project.update_metadata_descriptor(project: str | dict, metadata_descriptor: dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Update a metadata descriptor.
- Parameters:
project (dict / ID) – The project dict or id.
metadata_descriptor (dict) – The metadata descriptor that needs to be updated.
- Returns:
The updated metadata descriptor.
- Return type:
dict
- gazu.project.update_project(project: dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Save given project data into the API. Metadata are fully replaced by the ones set on given project.
- Parameters:
project (dict) – The project to update.
- Returns:
Updated project.
- Return type:
dict
- gazu.project.update_project_data(project: str | dict, data: dict = {}, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Update the metadata for the provided project. Keys that are not provided are not changed.
- Parameters:
project (dict / ID) – The project dict or id to save in database.
data (dict) – Free field to set metadata of any kind.
- Returns:
Updated project.
- Return type:
dict
gazu.search
- gazu.search.search_entities(query: str, project: str | dict | None = None, entity_types: list[str | dict] | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[str, list][source]
Search for entities matching the given query.
- Parameters:
query (str) – Search query string.
project (str / dict) – Optional project to limit search to.
entity_types (list) – Optional list of entity type dicts or IDs to filter by.
- Returns:
- Dictionary with entity type keys (“persons”, “assets”, “shots”)
containing lists of matching entities for each type.
- Return type:
dict
gazu.scene
- gazu.scene.add_shot_to_scene(scene: str | dict, shot: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Link a shot to a scene to mark the fact it was generated out from that scene.
- gazu.scene.all_asset_instances_for_scene(scene: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Return the list of asset instances listed in a scene.
- gazu.scene.all_camera_instances_for_scene(scene: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Return the list of camera instances listed in a scene.
- gazu.scene.all_scenes(project: str | dict | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Retrieve all scenes.
- gazu.scene.all_scenes_for_project(project: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Retrieve all scenes for given project.
- gazu.scene.all_scenes_for_sequence(sequence: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Retrieve all scenes which are children from given sequence.
- gazu.scene.all_shots_for_scene(scene: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Return the list of shots issued from given scene.
- gazu.scene.get_asset_instance_by_name(scene: str | dict, name: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict | None[source]
Returns the asset instance of the scene that has the given name.
- gazu.scene.get_scene(scene_id: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Return scene corresponding to given scene ID.
- gazu.scene.get_scene_by_name(sequence: str | dict, scene_name: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict | None[source]
Returns scene corresponding to given sequence and name.
- gazu.scene.get_sequence_from_scene(scene: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Return sequence which is parent of given shot.
- gazu.scene.new_scene(project: str | dict, sequence: str | dict, name: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Create a scene for given sequence.
- gazu.scene.new_scene_asset_instance(scene: str | dict, asset: str | dict, description: str | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Creates a new asset instance on given scene. The instance number is automatically generated (increment highest number).
- gazu.scene.remove_shot_from_scene(scene: str | dict, shot: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Remove link between a shot and a scene.
- gazu.scene.update_asset_instance_data(asset_instance: str | dict, data: dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Update the extra data of given asset instance.
gazu.shot
- gazu.shot.add_asset_instance_to_shot(shot: str | dict, asset_instance: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Link a new asset instance to given shot.
- Parameters:
shot (str / dict) – The shot dict or the shot ID.
asset_instance (str / dict) – The asset instance dict or ID.
- Returns:
Related shot.
- Return type:
dict
- gazu.shot.all_asset_instances_for_shot(shot: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
shot (str / dict) – The shot dict or the shot ID.
- Returns:
Asset instances linked to given shot.
- Return type:
list
- gazu.shot.all_episodes_for_project(project: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
project (str / dict) – The project dict or the project ID.
- Returns:
Episodes from database for given project.
- Return type:
list
- gazu.shot.all_previews_for_shot(shot: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
shot (str / dict) – The shot dict or the shot ID.
- Returns:
Previews from database for given shot.
- Return type:
list
- gazu.shot.all_sequences_for_episode(episode: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
episode (str / dict) – The episode dict or the episode ID.
- Returns:
Sequences which are children of given episode.
- Return type:
list
- gazu.shot.all_sequences_for_project(project: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
sequence (str / dict) – The project dict or the project ID.
- Returns:
Sequences from database for given project.
- Return type:
list
- gazu.shot.all_shots_for_episode(episode: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
episode (str / dict) – The episode dict or the episode ID.
- Returns:
Shots which are children of given episode.
- Return type:
list
- gazu.shot.all_shots_for_project(project: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
project (str / dict) – The project dict or the project ID.
- Returns:
Shots from database or for given project.
- Return type:
list
- gazu.shot.all_shots_for_sequence(sequence: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
sequence (str / dict) – The sequence dict or the sequence ID.
- Returns:
Shots which are children of given sequence.
- Return type:
list
- gazu.shot.export_shots_with_csv(project: str | dict, csv_file_path: str, episode: str | dict | None = None, assigned_to: str | dict | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) Response[source]
Export the Assets data for a project to a CSV file on disk.
- Parameters:
project (str / dict) – The ID or dict for the project to export.
csv_file_path (str) – The path on disk to write the CSV file to. If the path already exists it will be overwritten.
episode (str | dict | None) – Only export Shots that are linked to the given Episode, which can be provided as an ID string or model dict. If None, all assets will be exported.
assigned_to (str | dict | None) – Only export Shots that have one or more Tasks assigned to the given Person, specified as an ID string or model dict. If None, no filtering is put in place.
- Returns:
the response from the API server.
- Return type:
(requests.Response)
- gazu.shot.get_asset_instances_for_shot(shot: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Return the list of asset instances linked to given shot.
- gazu.shot.get_episode(episode_id: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
- Parameters:
episode_id (str) – ID of claimed episode.
- Returns:
Episode corresponding to given episode ID.
- Return type:
dict
- gazu.shot.get_episode_by_name(project: str | dict, episode_name: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict | None[source]
- Parameters:
project (str / dict) – The project dict or the project ID.
episode_name (str) – Name of claimed episode.
- Returns:
Episode corresponding to given name and project.
- Return type:
dict
- gazu.shot.get_episode_from_sequence(sequence: dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict | None[source]
- Parameters:
sequence (dict) – The sequence dict.
- Returns:
Episode which is parent of given sequence.
- Return type:
dict
- gazu.shot.get_episode_url(episode: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
- Parameters:
episode (str / dict) – The episode dict or the episode ID.
- Returns:
Web url associated to the given episode
- Return type:
url (str)
- gazu.shot.get_sequence(sequence_id: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
- Parameters:
sequence_id (str) – ID of claimed sequence.
- Returns:
Sequence corresponding to given sequence ID.
- Return type:
dict
- gazu.shot.get_sequence_by_name(project: str | dict, sequence_name: str, episode: str | dict | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict | None[source]
- Parameters:
project (str / dict) – The project dict or the project ID.
sequence_name (str) – Name of claimed sequence.
episode (str / dict) – The episode dict or the episode ID (optional).
- Returns:
Seqence corresponding to given name and project (and episode in case of TV Show).
- Return type:
dict
- gazu.shot.get_sequence_from_shot(shot: dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
- Parameters:
shot (dict) – The shot dict.
- Returns:
Sequence which is parent of given shot.
- Return type:
dict
- gazu.shot.get_shot(shot_id: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
- Parameters:
shot_id (str) – ID of claimed shot.
- Returns:
Shot corresponding to given shot ID.
- Return type:
dict
- gazu.shot.get_shot_by_name(sequence: str | dict, shot_name: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict | None[source]
- Parameters:
sequence (str / dict) – The sequence dict or the sequence ID.
shot_name (str) – Name of claimed shot.
- Returns:
Shot corresponding to given name and sequence.
- Return type:
dict
- gazu.shot.get_shot_url(shot: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
- Parameters:
shot (str / dict) – The shot dict or the shot ID.
- Returns:
Web url associated to the given shot
- Return type:
url (str)
- gazu.shot.import_otio(project: str | dict, otio_file_path: str, episode: str | dict | None = None, naming_convention: str | None = None, match_case: bool = True, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[Literal['created_shots', 'updated_shots'], list[dict]][source]
Import shots from an OpenTimelineIO file (works also for every OTIO adapters).
- Parameters:
project (str / dict) – The project dict or the project ID.
otio_file_path (str) – The OTIO file path.
episode (str / dict) – The episode dict or the episode ID.
naming_convention (str) – Template for matching shot names from the file.
match_case (bool) – Whether to match shot names case-sensitively.
- Returns:
- A dictionary with keys “created_shots” and “updated_shots”, each
mapping to a list of altered entity records from the import.
- Return type:
dict
- gazu.shot.import_shots_with_csv(project: str | dict, csv_file_path: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Import the Shots from a previously exported CSV file into the given project.
- Parameters:
project (str / dict) – The project to import the Shots into, as an ID string or model dict.
csv_file_path (str) – The path on disk to the CSV file.
- Returns:
the Shot dicts created by the import.
- Return type:
list[dict]
- gazu.shot.new_episode(project: str | dict, name: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Create an episode for given project.
- Parameters:
project (str / dict) – The project dict or the project ID.
name (str) – The name of the episode to create.
- Returns:
Created episode.
- Return type:
dict
- gazu.shot.new_sequence(project: str | dict, name: str, episode: str | dict | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Create a sequence for given project and episode.
- Parameters:
project (str / dict) – The project dict or the project ID.
episode (str / dict) – The episode dict or the episode ID.
name (str) – The name of the sequence to create.
- Returns:
Created sequence.
- Return type:
dict
- gazu.shot.new_shot(project: str | dict, sequence: str | dict, name: str, nb_frames: int | None = None, frame_in: int | None = None, frame_out: int | None = None, description: str | None = None, data: dict = {}, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Create a shot for given sequence and project. Add frame in and frame out parameters to shot extra data. Allow to set metadata too.
- Parameters:
project (str / dict) – The project dict or the project ID.
sequence (str / dict) – The sequence dict or the sequence ID.
name (str) – The name of the shot to create.
frame_in (int) – Frame in value for the shot.
frame_out (int) – Frame out value for the shot.
data (dict) – Free field to set metadata of any kind.
- Returns:
Created shot.
- Return type:
dict
- gazu.shot.remove_asset_instance_from_shot(shot: str | dict, asset_instance: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Remove link between an asset instance and given shot.
- Parameters:
shot (str / dict) – The shot dict or the shot ID.
asset_instance (str / dict) – The asset instance dict or ID.
- gazu.shot.remove_episode(episode: str | dict, force: bool = False, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Remove given episode and related from database.
If the force paramter is True, all records linked to the Episode will also be deleted - including all linked Sequences, Shots, Assets, Playlists and Tasks.
Otherwise, it will attempt to only delete the Episode entity. If the Episode has any linked records the operation will fail.
- Parameters:
episode (str / dict) – Episode to remove.
force (bool) – Whether to delete all data linked to the Episode as well.
- Raises:
ParameterException – If the Episode has linked entities and the force=True parameter has not been provided.
- gazu.shot.remove_sequence(sequence: str | dict, force: bool = False, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Remove given sequence and related from database.
If the force paramter is True, all records linked to the Sequence will also be deleted - including all linked Shots and Tasks.
Otherwise, it will attempt to only delete the Sequence entity. If the Sequence has any linked records the operation will fail.
- Parameters:
sequence (str / dict) – Sequence to remove.
force (bool) – Whether to delete all data linked to the Sequence as well.
- Raises:
ParameterException – If the Sequence has linked entities and the force=True parameter has not been provided.
- gazu.shot.remove_shot(shot: str | dict, force: bool = False, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Remove given shot from database.
If the Shot has tasks linked to it, this will by default mark the Shot as canceled. Deletion can be forced regardless of task links with the force parameter.
- Parameters:
shot (str / dict) – Shot to remove.
force (bool) – Whether to force deletion of the asset regardless of whether it has links to tasks.
- gazu.shot.restore_shot(shot: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Restore given shot into database (uncancel it).
- Parameters:
shot (str / dict) – Shot to restore.
- gazu.shot.update_episode(episode: dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Save given episode data into the API. Metadata are fully replaced by the ones set on given episode.
- Parameters:
episode (dict) – The episode dict to update.
- Returns:
Updated episode.
- Return type:
dict
- gazu.shot.update_episode_data(episode: str | dict, data: dict = {}, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Update the metadata for the provided episode. Keys that are not provided are not changed.
- Parameters:
episode (str / dict) – The episode dict or ID to save in database.
data (dict) – Free field to set metadata of any kind.
- Returns:
Updated episode.
- Return type:
dict
- gazu.shot.update_sequence(sequence: dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Save given sequence data into the API. Metadata are fully replaced by the ones set on given sequence.
- Parameters:
sequence (dict) – The sequence dict to update.
- Returns:
Updated sequence.
- Return type:
dict
- gazu.shot.update_sequence_data(sequence: str | dict, data: dict = {}, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Update the metadata for the provided sequence. Keys that are not provided are not changed.
- Parameters:
sequence (str / dict) – The sequence dicto or ID to save in database.
data (dict) – Free field to set metadata of any kind.
- Returns:
Updated sequence.
- Return type:
dict
- gazu.shot.update_shot(shot: dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Save given shot data into the API. Metadata are fully replaced by the ones set on given shot.
- Parameters:
shot (dict) – The shot dict to update.
- Returns:
Updated shot.
- Return type:
dict
- gazu.shot.update_shot_data(shot: str | dict, data: dict = {}, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Update the metadata for the provided shot. Keys that are not provided are not changed.
- Parameters:
shot (str / dict) – The shot dict or ID to save in database.
data (dict) – Free field to set metadata of any kind.
- Returns:
Updated shot.
- Return type:
dict
gazu.sync
- gazu.sync.convert_id_list(ids: list[str], model_map: dict) list[source]
- Parameters:
ids (list) – Ids to convert.
model_map (dict) – Map matching ids to another value.
- Returns:
Ids converted through given model map.
- Return type:
list
- gazu.sync.get_id_map_by_id(source_list: list[dict], target_list: list[dict], field: str = 'name') dict[source]
- Parameters:
source_list (list) – List of links to compare.
target_list (list) – List of links for which we want a diff.
- Returns:
A dict where keys are the source model names and the values are the IDs of the target models with same name. It’s useful to match a model from the source list to its relative in the target list based on its name.
- Return type:
dict
- gazu.sync.get_id_map_by_name(source_list: list[dict], target_list: list[dict]) dict[source]
- Parameters:
source_list (list) – List of links to compare.
target_list (list) – List of links for which we want a diff.
- Returns:
A dict where keys are the source model names and the values are the IDs of the target models with same name. It’s useful to match a model from the source list to its relative in the target list based on its name.
- Return type:
dict
- gazu.sync.get_last_events(limit: int = 20000, project: str | dict | None = None, after: str | None = None, before: str | None = None, only_files: bool = False, name: str | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Get last events that occured on the machine.
- Parameters:
limit (int) – Number of events to retrieve.
project (str / dict) – Get only events related to this project.
after (str) – Get only events occuring after given date.
before (str) – Get only events occuring before given date.
only_files (bool) – Get only events related to files.
- Returns:
Last events matching criterions.
- Return type:
list[dict]
- gazu.sync.get_link_list_diff(source_list: list[dict], target_list: list[dict]) tuple[list[dict], list[dict]][source]
- Parameters:
source_list (list) – List of links to compare.
target_list (list) – List of links for which we want a diff.
- Returns:
Two lists, one containing the missing links in the target list and one containing the links that should not be in the target list. Links are identified by their in ID and their out ID.
- Return type:
tuple
- gazu.sync.get_model_list_diff(source_list: list[dict], target_list: list[dict], id_field: str = 'id') tuple[list[dict], list[dict]][source]
- Parameters:
source_list (list) – List of models to compare.
target_list (list) – List of models for which we want a diff.
id_field (str) – the model field to use as an ID for comparison.
- Returns:
Two lists, one containing the missing models in the target list and one containing the models that should not be in the target list.
- Return type:
tuple
- gazu.sync.get_sync_asset_type_id_map(source_client: KitsuClient, target_client: KitsuClient) dict[source]
- Parameters:
source_client (KitsuClient) – client to get data from source API
target_client (KitsuClient) – client to push data to target API
- Returns:
A dict matching source asset type ids with target asset type ids
- Return type:
dict
- gazu.sync.get_sync_department_id_map(source_client: KitsuClient, target_client: KitsuClient) dict[source]
- Parameters:
source_client (KitsuClient) – client to get data from source API
target_client (KitsuClient) – client to push data to target API
- Returns:
A dict matching source departments ids with target department ids
- Return type:
dict
- gazu.sync.get_sync_person_id_map(source_client: KitsuClient, target_client: KitsuClient) dict[source]
- Parameters:
source_client (KitsuClient) – client to get data from source API
target_client (KitsuClient) – client to push data to target API
- Returns:
A dict matching source person ids with target person ids
- Return type:
dict
- gazu.sync.get_sync_project_id_map(source_client: KitsuClient, target_client: KitsuClient) dict[source]
- Parameters:
source_client (KitsuClient) – client to get data from source API
target_client (KitsuClient) – client to push data to target API
- Returns:
A dict matching source project ids with target project ids
- Return type:
dict
- gazu.sync.get_sync_task_status_id_map(source_client: KitsuClient, target_client: KitsuClient) dict[source]
- Parameters:
source_client (KitsuClient) – client to get data from source API
target_client (KitsuClient) – client to push data to target API
- Returns:
- A dict matching source task status ids with target task status
ids
- Return type:
dict
- gazu.sync.get_sync_task_type_id_map(source_client: KitsuClient, target_client: KitsuClient) dict[source]
- Parameters:
source_client (KitsuClient) – client to get data from source API
target_client (KitsuClient) – client to push data to target API
- Returns:
A dict matching source task type ids with target task type ids
- Return type:
dict
- gazu.sync.import_entities(entities: list[dict], client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Import entities from another instance to target instance (keep id and audit dates).
- Parameters:
entities (list) – Entities to import.
- Returns:
Entities created.
- Return type:
list[dict]
- gazu.sync.import_entity_links(links: list[dict], client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Import enitity links from another instance to target instance (keep id and audit dates).
- Parameters:
links (list) – Entity links to import.
- Returns:
Entity links created.
- Return type:
dict
- gazu.sync.import_tasks(tasks: list[dict], client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Import tasks from another instance to target instance (keep id and audit dates).
- Parameters:
tasks (list) – Tasks to import.
- Returns:
Tasks created.
- Return type:
list[dict]
- gazu.sync.is_changed(source_model: dict, target_model: dict) bool[source]
- Parameters:
source_model (dict) – Model from the source API.
target_model (dict) – Matching model from the target API.
- Returns:
True if the source model is older than the target model (based on updated_at field)
- Return type:
bool
- gazu.sync.push_assets(project_source: dict, project_target: dict, client_source: KitsuClient, client_target: KitsuClient) list[dict][source]
Copy assets from source to target and preserve audit fields (id, created_at, and updated_at).
- Parameters:
project_source (dict) – The project to get assets from
project_target (dict) – The project to push assets to
client_source (KitsuClient) – client to get data from source API
client_target (KitsuClient) – client to push data to target API
- Returns:
Pushed assets
- Return type:
list
- gazu.sync.push_entity_links(project_source: dict, project_target: dict, client_source: KitsuClient, client_target: KitsuClient) list[dict][source]
Copy entity links (breakdown, concepts) from source to target and preserve audit fields (id, created_at, and updated_at).
- Parameters:
project_source (dict) – The project to get assets from
project_target (dict) – The project to push assets to
client_source (KitsuClient) – client to get data from source API
client_target (KitsuClient) – client to push data to target API
- Returns:
Pushed entity links
- Return type:
list
- gazu.sync.push_episodes(project_source: dict, project_target: dict, client_source: KitsuClient, client_target: KitsuClient) list[dict][source]
Copy episodes from source to target and preserve audit fields (id, created_at, and updated_at)
- Parameters:
project_source (dict) – The project to get episodes from
project_target (dict) – The project to push episodes to
client_source (KitsuClient) – client to get data from source API
client_target (KitsuClient) – client to push data to target API
- Returns:
Pushed episodes
- Return type:
list
- gazu.sync.push_project_entities(project_source: dict, project_target: dict, client_source: KitsuClient, client_target: KitsuClient) dict[source]
Copy assets, episodes, sequences, shots and entity links from source to target and preserve audit fields (id, created_at, and updated_at).
- Parameters:
project_source (dict) – The project to get assets from
project_target (dict) – The project to push assets to
client_source (KitsuClient) – client to get data from source API
client_target (KitsuClient) – client to push data to target API
- Returns:
Pushed data
- Return type:
dict
- gazu.sync.push_sequences(project_source: dict, project_target: dict, client_source: KitsuClient, client_target: KitsuClient) list[dict][source]
Copy sequences from source to target and preserve audit fields (id, created_at, and updated_at)
- Parameters:
project_source (dict) – The project to get sequences from
project_target (dict) – The project to push sequences to
client_source (KitsuClient) – client to get data from source API
client_target (KitsuClient) – client to push data to target API
- Returns:
Pushed sequences
- Return type:
list
- gazu.sync.push_shots(project_source: dict, project_target: dict, client_source: KitsuClient, client_target: KitsuClient) list[dict][source]
Copy shots from source to target and preserve audit fields (id, created_at, and updated_at).
- Parameters:
project_source (dict) – The project to get shots from
project_target (dict) – The project to push shots to
client_source (KitsuClient) – client to get data from source API
client_target (KitsuClient) – client to push data to target API
- Returns:
Pushed shots
- Return type:
list
- gazu.sync.push_task_comment(task_status_map: dict, person_map: dict, task: str | dict, comment: dict, client_source: KitsuClient, client_target: KitsuClient, author_id: str | None = None, tmp_path: str = '/tmp/zou/sync/') dict[source]
Create a new comment into target api for each comment in source task but preserve only created_at field. Attachments and previews are created too.
- Parameters:
task_status_map (dict) – A mapping of source TaskStatus IDs to target IDs.
person_map (dict) – A mapping of source Person IDs to target IDs.
task (str / dict) – The task to push the comment for.
comment (dict) – The comment to push.
client_source (KitsuClient) – client to get data from source API
client_target (KitsuClient) – client to push data to target API
author_id (str) – The ID of the Person to set as the comment author.
tmp_path (str) – The local path on disk to download the attachment files for syncing.
- Returns:
The source comment.
- Return type:
dict
- gazu.sync.push_task_comments(task_status_map: dict, person_map: dict, task: str | dict, client_source: KitsuClient, client_target: KitsuClient) list[dict][source]
Create a new comment into target api for each comment in source task but preserve only created_at field. Attachments and previews are created too.
- Parameters:
task_status_map (dict) – A mapping of source TaskStatus IDs to target IDs.
person_map (dict) – A mapping of source Person IDs to target IDs.
task (str / dict) – The task to push comments for
client_source (KitsuClient) – client to get data from source API
client_target (KitsuClient) – client to push data to target API
- Returns:
Created comments
- Return type:
list
- gazu.sync.push_tasks(project_source: dict, project_target: dict, default_status: str | dict, client_source: KitsuClient, client_target: KitsuClient) list[dict][source]
Copy tasks from source to target and preserve audit fields (id, created_at, and updated_at) Attachments and previews are created too.
- Parameters:
project_source (dict) – The project to get assets from
project_target (dict) – The project to push assets to
default_status (str / dict) – The default status for the pushed tasks
client_source (KitsuClient) – client to get data from source API
client_target (KitsuClient) – client to push data to target API
- Returns:
Pushed entity links
- Return type:
list
- gazu.sync.push_tasks_comments(project_source: dict, client_source: KitsuClient, client_target: KitsuClient) list[dict][source]
Create a new comment into target api for each comment in source project but preserve only created_at field. Attachments and previews are created too.
- Parameters:
project_source (dict) – The project to get assets from
client_source (KitsuClient) – client to get data from source API
client_target (KitsuClient) – client to push data to target API
- Returns:
Created comments
- Return type:
list
gazu.task
- gazu.task.acknowledge_comment(task: str | dict, comment: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Acknowledge a comment or remove the acknowledgment if it’s already acknowledged.
- Parameters:
task (str / dict) – The task dict or id.
comment (str / dict) – The comment dict or id.
- Returns:
Updated comment.
- Return type:
dict
- gazu.task.add_attachment_files_to_comment(task: str | dict, comment: str | dict, attachments: str | list[str] = [], client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Add attachments files to a given comment.
- Parameters:
task (str / dict) – The task dict or the task ID.
comment (str / dict) – The comment dict or the comment ID.
attachments (list / str) – A list of path for attachments or directly the path.
- Returns:
Added attachment files.
- Return type:
dict
- gazu.task.add_comment(task: str | dict, task_status: str | dict, comment: str = '', person: str | dict | None = None, checklist: list[dict] = [], attachments: list[str] = [], created_at: str | None = None, links: list[str] = [], client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Add comment to given task. Each comment requires a task_status. Since the addition of comment triggers a task status change. Comment text can be empty.
- Parameters:
task (str / dict) – The task dict or the task ID.
task_status (str / dict) – The task status dict or ID.
comment (str) – Comment text
person (str / dict) – Comment author
checklist (list) – Comment checklist, e.g [{“text”: “Item 1”, “checked”: false}]
attachments (list[file_path]) – Attachments file paths
created_at (str) – Comment date
links (list) – List of URL links to add to the comment
- Returns:
Created comment.
- Return type:
dict
- gazu.task.add_preview(task: str | dict, comment: str | dict, preview_file_path: str | None = None, preview_file_url: str | None = None, normalize_movie: bool = True, revision: int | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Add a preview to given comment.
- Parameters:
task (str / dict) – The task dict or the task ID.
comment (str / dict) – The comment or the comment ID.
preview_file_path (str) – Path of the file to upload as preview.
preview_file_url (str) – Url to download the preview file if no path is
given.
normalize_movie (bool) – Normalize the movie or not.
revision (int) – Revision number.
- Returns:
Created preview file model.
- Return type:
dict
- gazu.task.add_preview_to_comment(comment: str | dict, preview_file: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Add a preview to a comment.
- Parameters:
comment (str / dict) – The comment dict or id.
preview_file (str / dict) – The preview file dict or id.
- Returns:
Updated comment.
- Return type:
dict
- gazu.task.add_tasks_batch_comments(tasks: list[str | dict], comments_data: dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Add comments to multiple tasks in a batch operation.
- Parameters:
tasks (list) – List of task dicts or IDs.
comments_data (dict) – Comment data to apply to all tasks. Should contain task_status_id, comment text, and optionally person_id, checklist, attachments, etc.
- Returns:
List of created comments.
- Return type:
list
- gazu.task.add_time_spent(task: str | dict, person: str | dict, date: str, duration: int, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Add given duration to the already logged duration for given task and person at a given date.
- Parameters:
task (str / dict) – The task dict or the task ID.
person (str / dict) – The person who spent the time on given task.
date (str) – The date (“YYYY-MM-DD”) for which time spent must be set.
duration (int) – The duration (in minutes) of the time spent on given task.
- Returns:
Updated time spent entry.
- Return type:
dict
- gazu.task.all_assets_tasks_for_episode(episode: str | dict, relations: bool = False, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Retrieve all tasks directly linked to all assets of given episode.
- gazu.task.all_comments_for_project(project: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Get all comments for a project.
- Parameters:
project (str / dict) – The project dict or id.
- Returns:
Comments for the project.
- Return type:
list
- gazu.task.all_comments_for_task(task: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
task (str / dict) – The task dict or the task ID.
- Returns:
Comments linked to the given task.
- gazu.task.all_done_tasks_for_person(person: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Returns:
Tasks that are done for given person (only for open projects).
- Return type:
list
- gazu.task.all_notifications_for_project(project: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Get all notifications for a project.
- Parameters:
project (str / dict) – The project dict or id.
- Returns:
Notifications for the project.
- Return type:
list
- gazu.task.all_open_tasks(client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Get all open tasks.
- Returns:
Open tasks.
- Return type:
list
- gazu.task.all_open_tasks_for_person(person: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Get all open tasks for a person.
- Parameters:
person (str / dict) – The person dict or id.
- Returns:
Open tasks for the person.
- Return type:
list
- gazu.task.all_preview_files_for_project(project: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Get all preview files for a project.
- Parameters:
project (str / dict) – The project dict or id.
- Returns:
Preview files for the project.
- Return type:
list
- gazu.task.all_previews_for_task(task: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Get all previews for a task.
- Parameters:
task (str / dict) – The task dict or id.
- Returns:
Previews for the task.
- Return type:
list
- gazu.task.all_shot_tasks_for_episode(episode: str | dict, relations: bool = False, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Retrieve all tasks directly linked to all shots of given episode.
- gazu.task.all_shot_tasks_for_sequence(sequence: str | dict, relations: bool = False, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Retrieve all tasks directly linked to all shots of given sequence.
- gazu.task.all_subscriptions_for_project(project: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Get all subscriptions for a project.
- Parameters:
project (str / dict) – The project dict or id.
- Returns:
Subscriptions for the project.
- Return type:
list
- gazu.task.all_task_statuses(client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Returns:
Task statuses stored in database.
- Return type:
list
- gazu.task.all_task_statuses_for_project(project: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Returns:
Task status stored in database.
- Return type:
list
- gazu.task.all_task_types(client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Returns:
Task types stored in database.
- Return type:
list
- gazu.task.all_task_types_for_asset(asset: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
asset (str / dict) – The asset dict or the asset ID.
- Returns:
Task types of tasks related to given asset.
- Return type:
list
- gazu.task.all_task_types_for_concept(concept: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
concept (str / dict) – The concept dict or the concept ID.
- Returns
list: Task types of task linked to given concept.
- gazu.task.all_task_types_for_episode(episode: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Returns:
Task types of tasks linked directly to given episode.
- Return type:
list
- gazu.task.all_task_types_for_project(project: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Returns:
Task types stored in database.
- Return type:
list
- gazu.task.all_task_types_for_scene(scene: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
scene (str / dict) – The scene dict or the scene ID.
- Returns:
Task types of tasks linked to given scene.
- Return type:
list
- gazu.task.all_task_types_for_sequence(sequence: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
sequence (str / dict) – The sequence dict or the sequence ID.
- Returns:
Task types of tasks linked directly to given sequence.
- Return type:
list
- gazu.task.all_task_types_for_shot(shot: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
shot (str / dict) – The shot dict or the shot ID.
- Returns
list: Task types of task linked to given shot.
- gazu.task.all_tasks_for_asset(asset: str | dict, relations: bool = False, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
asset (str / dict) – The asset dict or the asset ID.
- Returns:
Tasks directly linked to given asset.
- Return type:
list
- gazu.task.all_tasks_for_concept(concept: str | dict, relations: bool = False, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
concept (str / dict) – The concept dict or the concept ID.
- Returns:
Tasks linked to given concept.
- Return type:
list
- gazu.task.all_tasks_for_edit(edit: str | dict, relations: bool = False, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
edit (str / dict) – The edit dict or the edit ID.
- Returns:
Tasks linked to given edit.
- Return type:
list
- gazu.task.all_tasks_for_entity_and_task_type(entity: str | dict, task_type: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
entity (str / dict) – The entity dict or the entity ID.
task_type (str / dict) – The task type dict or ID.
- Returns:
Tasks for given entity or task type.
- Return type:
list
- gazu.task.all_tasks_for_episode(episode: str | dict, relations: bool = False, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Retrieve all tasks directly linked to given episode.
- gazu.task.all_tasks_for_person(person: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Returns:
Tasks that are not done for given person (only for open projects).
- Return type:
list
- gazu.task.all_tasks_for_person_and_type(person: str | dict, task_type: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Get all tasks for a person and task type.
- Parameters:
person (str / dict) – The person dict or id.
task_type (str / dict) – The task type dict or id.
- Returns:
Tasks for the person and task type.
- Return type:
list
- gazu.task.all_tasks_for_project(project: str | dict, task_type: str | dict | None = None, episode: str | dict | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
project (str / dict) – The project (or its ID) to get tasks from.
task_type (str / dict) – The task type (or its ID) to filter tasks.
episode (str / dict) – The episode (or its ID) to filter tasks.
- Returns:
Tasks related to given project.
- Return type:
list[dict]
- gazu.task.all_tasks_for_scene(scene: str | dict, relations: bool = False, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
sequence (str / dict) – The scene dict or the scene ID.
- Returns:
Tasks linked to given scene.
- Return type:
list
- gazu.task.all_tasks_for_sequence(sequence: str | dict, relations: bool = False, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
sequence (str / dict) – The sequence dict or the sequence ID.
- Returns
list: Tasks linked to given sequence.
- gazu.task.all_tasks_for_shot(shot: str | dict, relations: bool = False, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
shot (str / dict) – The shot dict or the shot ID.
- Returns:
Tasks linked to given shot.
- Return type:
list
- gazu.task.all_tasks_for_task_status(project: str | dict, task_type: str | dict, task_status: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
project (str / dict) – The project dict or the project ID.
task_type (str / dict) – The task type dict or ID.
task_status (str / dict) – The task status dict or ID.
- Returns:
Tasks set at given status for given project and task type.
- Return type:
list
- gazu.task.all_tasks_for_task_type(project: str | dict, task_type: str | dict, episode: str | dict | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
project (str / dict) – The project dict or the project ID.
task_type (str / dict) – The task type dict or ID.
episode_id (str / dict) – The episode dict or ID.
- Returns:
Tasks for given project and task type.
- Return type:
list
- gazu.task.assign_task(task: str | dict, person: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Assign one Person to a Task. :param task: The task dict or the task ID. :type task: str / dict :param person: The person dict or the person ID. :type person: str / dict
- Returns:
(dict) the affected Task
- gazu.task.assign_tasks_to_person(tasks: list[str | dict], person: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Assign multiple tasks to a person.
- Parameters:
tasks (list) – List of task dicts or IDs.
person (str / dict) – The person dict or id.
- Returns:
Response information.
- Return type:
dict
- gazu.task.batch_comments(comments: list[dict] = [], task: str | dict | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Publish a list of comments (with attachments and previews) for given task. Each dict comments may contain a list of attachment files path and preview files path in the keys “attachment_files” and “preview_files”. If no task is given each comments needs to have a task_id key.
- Parameters:
comments (list) – List of comments to publish.
task (str / dict) – The task dict or the task ID.
- Returns:
List of created comments.
- Return type:
list
- gazu.task.clear_assignations(tasks: str | dict | list[str | dict], person: str | dict | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[str][source]
Clear assignations for a single or multiple tasks. If no person is given, all assignations are cleared.
- Parameters:
tasks (list / str / dict) – Task dict or the task ID, single or list.
person (str / dict) – The person dict or the person ID.
- Returns:
(list[str]) List of affected Task IDs
- gazu.task.create_asset_tasks(asset: str | dict, task_types: list[str | dict], client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Create tasks for an asset.
- Parameters:
asset (str / dict) – The asset dict or id.
task_types (list) – List of task type dicts or IDs.
- Returns:
Created tasks.
- Return type:
list
- gazu.task.create_concept_tasks(concept: str | dict, task_types: list[str | dict], client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Create tasks for a concept.
- Parameters:
concept (str / dict) – The concept dict or id.
task_types (list) – List of task type dicts or IDs.
- Returns:
Created tasks.
- Return type:
list
- gazu.task.create_edit_tasks(edit: str | dict, task_types: list[str | dict], client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Create tasks for an edit.
- Parameters:
edit (str / dict) – The edit dict or id.
task_types (list) – List of task type dicts or IDs.
- Returns:
Created tasks.
- Return type:
list
- gazu.task.create_entity_tasks(entity: str | dict, task_types: list[str | dict], client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Create tasks for an entity.
- Parameters:
entity (str / dict) – The entity dict or id.
task_types (list) – List of task type dicts or IDs.
- Returns:
Created tasks.
- Return type:
list
- gazu.task.create_multiple_comments(project: str | dict, comments: list[dict] = [], client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Create multiple comments at once for a specific project. Each comment updates the respective task status. Each dict comments may contain a list of attachment files path and preview files path in the keys “attachment_files” and “preview_files”.
- Parameters:
project (str / dict) – The project dict or the project ID.
comments (list) – List of comments to publish. Each comment must have a task_id key.
- Returns:
List of created comments.
- Return type:
list
- gazu.task.create_preview(task: str | dict, comment: str | dict, revision: int | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Create a preview into given comment.
- Parameters:
task (str / dict) – The task dict or the task ID.
comment (str / dict) – The comment or the comment ID.
revision (int) – Revision number.
- Returns:
Created preview file model.
- Return type:
dict
- gazu.task.create_shot_tasks(shot: str | dict, task_types: list[str | dict], client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Create tasks for a shot.
- Parameters:
shot (str / dict) – The shot dict or id.
task_types (list) – List of task type dicts or IDs.
- Returns:
Created tasks.
- Return type:
list
- gazu.task.delete_comment_attachment(comment: str | dict, attachment_file: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Delete an attachment from a comment.
- Parameters:
comment (str / dict) – The comment dict or id.
attachment_file (str / dict) – The attachment file dict or id.
- Returns:
Request response object.
- Return type:
str
- gazu.task.delete_comment_reply(comment: str | dict, reply: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Delete a reply to a comment.
- Parameters:
comment (str / dict) – The comment dict or id.
reply (str / dict) – The reply comment dict or id.
- Returns:
Request response object.
- Return type:
str
- gazu.task.get_comment(comment_id: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Get comment instance
- Parameters:
comment_id (ID) – The comment ID.
- Returns:
Given comment instance.
- Return type:
dict
- gazu.task.get_default_task_status(client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
- Returns:
The unique task status flagged with is_default.
- Return type:
dict
- gazu.task.get_last_comment_for_task(task: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict | None[source]
- Parameters:
task (str / dict) – The task dict or the task ID.
- Returns:
Last comment posted for given task.
- gazu.task.get_open_tasks_stats(client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Get statistics for open tasks.
- Returns:
Open tasks statistics.
- Return type:
dict
- gazu.task.get_persons_tasks_dates(project: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Get tasks dates for persons in a project.
- Parameters:
project (str / dict) – The project dict or id.
- Returns:
Tasks dates for persons.
- Return type:
dict
- gazu.task.get_task(task_id: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
- Parameters:
task_id (str) – ID of claimed task.
- Returns:
Task matching given ID.
- Return type:
dict
- gazu.task.get_task_by_entity(entity: str | dict, task_type: str | dict, name: str = 'main', client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict | None[source]
- Parameters:
entity (str / dict) – The entity dict or the entity ID.
task_type (str / dict) – The task type dict or ID.
name (str) – Name of the task to look for.
- Returns:
Task matching given entity, task type and name.
- gazu.task.get_task_by_path(project: str | dict, file_path: str, entity_type: str = 'shot', client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
- Parameters:
project (str / dict) – The project dict or the project ID.
file_path (str) – The file path to find a related task.
entity_type (str) – asset, shot or scene.
- Returns:
A task from given file path. This function requires context: the project related to the given path and the related entity type.
- Return type:
dict
- gazu.task.get_task_status(task_status_id: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
- Parameters:
task_status_id (str) – ID of claimed task status.
- Returns:
Task status matching given ID.
- Return type:
dict
- gazu.task.get_task_status_by_name(name: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict | None[source]
- Parameters:
name (str / dict) – The name of claimed task status.
- Returns:
Task status matching given name.
- Return type:
dict
- gazu.task.get_task_status_by_short_name(task_status_short_name: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict | None[source]
- Parameters:
short_name (str / dict) – The short name of claimed task status.
- Returns:
Task status matching given short name.
- Return type:
dict
- gazu.task.get_task_time_spent_for_date(task: str | dict, date: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Get time spent for a task on a specific date.
- Parameters:
task (str / dict) – The task dict or id.
date (str) – Date in YYYY-MM-DD format.
- Returns:
Time spent information.
- Return type:
dict
- gazu.task.get_task_type(task_type_id: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
- Parameters:
task_type_id (str) – ID of claimed task type.
- Returns:
Task type matching given ID.
- Return type:
dict
- gazu.task.get_task_type_by_name(task_type_name: str, for_entity: str | None = None, department: str | dict | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict | None[source]
- Parameters:
task_type_name (str) – Name of claimed task type.
for_entity (str) – The entity type for which the task type is created.
department (str / dict) – The department for which the task type is created.
- Returns:
Task type object for given name, or None if none found.
- Return type:
dict
- gazu.task.get_task_type_by_short_name(task_type_short_name: str, for_entity: str | None = None, department: str | dict | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict | None[source]
- Parameters:
task_type_short_name (str) – Short name of claimed task type.
for_entity (str) – The entity type for which the task type is created.
department (str /dict) – The department for which the task type is created.
- Returns:
Task type object for given name, or None if none found.
- Return type:
dict
- gazu.task.get_task_url(task: dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
- Parameters:
task (dict) – The task dict.
- Returns:
Web url associated to the given task
- Return type:
url (str)
- gazu.task.get_time_spent(task: str | dict, date: str | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Get the time spent by CG artists on a task at a given date if given. A field contains the total time spent. Durations are given in minutes. Date format is YYYY-MM-DD.
- Parameters:
task (str / dict) – The task dict or the task ID.
date (str) – The date for which time spent is required.
- Returns:
A dict with person ID as key and time spent object as value.
- Return type:
dict
- gazu.task.new_task(entity: str | dict, task_type: str | dict, name: str = 'main', task_status: dict | None = None, assigner: str | dict | None = None, assignees: list[str | dict] = [], client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Create a new task for given entity and task type.
- Parameters:
entity (dict) – Entity for which task is created.
task_type (dict) – Task type of created task.
name (str) – Name of the task (default is “main”).
task_status (dict) – The task status to set (default status is Todo).
assigner (dict) – Person who assigns the task.
assignees (list) – List of people assigned to the task.
- Returns:
Created task.
- gazu.task.new_task_status(name: str, short_name: str, color: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Create a new task status with the given name, short name and color.
- Parameters:
name (str) – The name of the task status
short_name (str) – The short name of the task status
color (str) – The color of the task status as an hexadecimal string
ex (with # as first character.) – #00FF00
- Returns:
The created task status
- Return type:
dict
- gazu.task.new_task_type(name: str, color: str = '#000000', for_entity: str = 'Asset', client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Create a new task type with the given name.
If a Task Type with the given name already exists within Kitsu, it will be returned.
- Parameters:
name (str) – The name of the task type
color (str) – The color of the task type as an hexadecimal string
ex (with # as first character.) – #00FF00
for_entity (str) – The entity type for which the task type is created.
- Returns:
The created task type
- Return type:
dict
- gazu.task.publish_preview(task: str | dict, task_status: str | dict, comment: str = '', person: str | dict | None = None, checklist: list[dict] = [], attachments: list[str] = [], created_at: str | None = None, preview_file_path: str | None = None, preview_file_url: str | None = None, normalize_movie: bool = True, revision: int | None = None, set_thumbnail: bool = False, links: list[str] = [], client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) tuple[dict, dict][source]
Publish a comment and include given preview for given task and set given task status.
- Parameters:
task (str / dict) – The task dict or the task ID.
task_status (str / dict) – The task status dict or ID.
comment (str) – Comment text
person (str / dict) – Comment author
checklist (list) – Comment checklist
attachments (list[file_path]) – Attachments file paths
created_at (str) – Comment date
preview_file_path (str) – Path of the file to upload as preview.
preview_file_url (str) – Url to download the preview file if no path is
given.
normalize_movie (bool) – Set to false to not do operations on it on the
side. (server)
revision (int) – Revision number.
set_thumbnail (bool) – Set the preview as thumbnail of the entity.
links (list) – List of links to add to the comment
- Returns:
Created comment model and created preview file model.
- Return type:
tuple(dict, dict)
- gazu.task.remove_comment(comment: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Remove given comment and related (previews, news, notifications) from database.
- Parameters:
comment (str / dict) – The comment dict or the comment ID.
- gazu.task.remove_preview_from_comment(comment: str | dict, preview_file: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Remove a preview from a comment.
- Parameters:
comment (str / dict) – The comment dict or id.
preview_file (str / dict) – The preview file dict or id.
- gazu.task.remove_task(task: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Remove given task from database.
- Parameters:
task (str / dict) – The task dict or the task ID.
- gazu.task.remove_task_status(task_status: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Remove given task status from database.
- Parameters:
task_status (str / dict) – The task status dict or ID.
- gazu.task.remove_task_type(task_type: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Remove given task type from database.
- Parameters:
task_type (str / dict) – The task type dict or ID.
- gazu.task.remove_tasks_batch(tasks: list[str | dict], client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) Response[source]
Delete multiple tasks in batch.
- Parameters:
tasks (list) – List of task dicts or IDs to delete.
- Returns:
Request response object.
- Return type:
Response
- gazu.task.remove_tasks_for_type(project: str | dict, task_type: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Delete all tasks for a task type in a project.
- Parameters:
project (str / dict) – The project dict or id.
task_type (str / dict) – The task type dict or id.
- gazu.task.remove_time_spent(time_spent: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Delete a time spent entry.
- Parameters:
time_spent (str / dict) – The time spent dict or id.
- Returns:
Request response object.
- Return type:
Response
- gazu.task.reply_to_comment(comment: str | dict, text: str, person: str | dict | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Reply to an existing comment.
- Parameters:
comment (str / dict) – The comment dict or id to reply to.
text (str) – The reply text.
person (str / dict) – The person dict or id making the reply.
- Returns:
Created reply comment.
- Return type:
dict
- gazu.task.set_main_preview(preview_file: str | dict, frame_number: int | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Set given preview as thumbnail of given entity.
- Parameters:
preview_file (str / dict) – The preview file dict or ID.
frame_number (int) – Frame of preview video to set as main preview
- Returns:
Created preview file model.
- Return type:
dict
- gazu.task.set_time_spent(task: str | dict, person: str | dict, date: str, duration: int, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Set the time spent by a CG artist on a given task at a given date.
- Parameters:
task (str / dict) – The task dict or the task ID.
person (str / dict) – The person who spent the time on given task.
date (str) – The date (“YYYY-MM-DD”) for which time spent must be set.
duration (int) – The duration (in minutes) of the time spent on given task.
- Returns:
Created time spent entry.
- Return type:
dict
- gazu.task.start_task(task: str | dict, started_task_status: str | dict | None = None, person: str | dict | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Create a comment to change task status to started_task_status (by default WIP) and set its real start date to now.
- Parameters:
task (str / dict) – The task dict or the task ID.
started_task_status (str / dict) – The task status dict or ID.
person (str / dict) – The person dict or the person ID.
- Returns:
Created comment.
- Return type:
dict
- gazu.task.task_to_review(task: str | dict, person: str | dict, comment: str, revision: int = 1, change_status: bool = True, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Deprecated. Mark given task as pending, waiting for approval. Author is given through the person argument.
- Parameters:
task (str / dict) – The task dict or the task ID.
person (str / dict) – The person dict or the person ID.
comment (str) – Comment text
revision (int) – Force revision of related preview file
change_status (bool) – If set to false, the task status is not changed.
- Returns:
Modified task
- Return type:
dict
- gazu.task.update_comment(comment: dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Save given comment data into the API. Metadata are fully replaced by the ones set on given comment.
- Parameters:
comment (dict) – The comment dict to update.
- Returns:
Updated comment.
- Return type:
dict
- gazu.task.update_task(task: dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Update given task into the API. Metadata are fully replaced by the ones set on given task.
- Parameters:
task (dict) – The task dict to update.
- Returns:
Updated task.
- Return type:
dict
- gazu.task.update_task_data(task: str | dict, data: dict = {}, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Update the metadata for the provided task. Keys that are not provided are not changed.
- Parameters:
task (str / dict) – The task dict or ID to save in database.
data (dict) – Free field to set metadata of any kind.
- Returns:
Updated task.
- Return type:
dict
- gazu.task.update_task_status(task_status: dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Update given task status into the API.
- Parameters:
task_status (dict) – The task status dict to update.
- Returns:
Updated task status.
- Return type:
dict
- gazu.task.update_task_type(task_type: dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Update given task type into the API.
- Parameters:
task_type (dict) – The task type dict to update.
- Returns:
Updated task type.
- Return type:
dict
- gazu.task.upload_preview_file(preview_file: str | dict, file_path: str, normalize_movie: bool = True, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Create a preview into given comment.
- Parameters:
preview_file (str / dict) – The preview_file dict or the preview_file ID.
file_path (str) – Path of the file to upload as preview.
gazu.user
- gazu.user.all_asset_types_for_project(project: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
project (str / dict) – The project dict or the project ID.
- Returns:
Asset types for which the user has a task assigned for given project.
- Return type:
list
- gazu.user.all_assets_for_asset_type_and_project(project: str | dict, asset_type: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
project (str / dict) – The project dict or the project ID.
asset_type (str / dict) – The asset type dict or ID.
- Returns:
Assets for given project and asset type and for which the user has a task assigned.
- Return type:
list
- gazu.user.all_chats(client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Get all chats for current user.
- Returns:
Chats.
- Return type:
list
- gazu.user.all_desktop_login_logs(client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[source]
Get desktop login logs for current user.
- Returns:
Desktop login logs.
- Return type:
list
- gazu.user.all_done_tasks(client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Returns:
Tasks assigned to current user which are done.
- Return type:
list
- gazu.user.all_episodes_for_project(project: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
project (str / dict) – The project dict or the project ID.
- Returns:
Episodes for which user has tasks assigned for given project.
- Return type:
list
- gazu.user.all_filter_groups(client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Get all filter groups for current user.
- Returns:
Filter groups.
- Return type:
list
- gazu.user.all_filters(client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Returns:
all filters for current user.
- Return type:
list
- gazu.user.all_notifications(client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Get all notifications for current user.
- Returns:
Notifications.
- Return type:
list
- gazu.user.all_open_projects(client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Returns:
Projects for which the user is part of the team. Admins see all projects
- Return type:
list
- gazu.user.all_project_assets(project: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Get assets for which user has tasks assigned for given project.
- Parameters:
project (str / dict) – The project dict or id.
- Returns:
Assets for the project.
- Return type:
list
- gazu.user.all_scenes_for_sequence(sequence: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
sequence (str / dict) – The sequence dict or the sequence ID.
- Returns:
Scenes for which user has tasks assigned for given sequence.
- Return type:
list
- gazu.user.all_sequences_for_project(project: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
project (str / dict) – The project dict or the project ID.
- Returns:
Sequences for which user has tasks assigned for given project.
- Return type:
list
- gazu.user.all_shots_for_sequence(sequence: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
sequence (str / dict) – The sequence dict or the sequence ID.
- Returns:
Shots for which user has tasks assigned for given sequence.
- Return type:
list
- gazu.user.all_task_types_for_asset(asset: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
asset (str / dict) – The asset dict or the asset ID.
- Returns:
Task Types of tasks assigned to current user for given asset.
- Return type:
list
- gazu.user.all_task_types_for_scene(scene: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
scene (str / dict) – The scene dict or the scene ID.
- Returns:
Task types of tasks assigned to current user for given scene.
- Return type:
list
- gazu.user.all_task_types_for_sequence(sequence: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Returns:
Task types for given asset and current user.
- Return type:
list
- gazu.user.all_task_types_for_shot(shot: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
shot (str / dict) – The shot dict or the shot ID.
- Returns:
Task Types of tasks assigned to current user for given shot.
- Return type:
list
- gazu.user.all_tasks_for_asset(asset: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
asset (str / dict) – The asset dict or the asset ID.
- Returns:
Tasks for given asset and current user.
- Return type:
list
- gazu.user.all_tasks_for_scene(scene: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
scene (str / dict) – The scene dict or the scene ID.
- Returns:
Tasks assigned to current user for given scene.
- Return type:
list
- gazu.user.all_tasks_for_sequence(sequence: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Return the list of tasks for given asset and current user.
- gazu.user.all_tasks_for_shot(shot: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Parameters:
shot (str / dict) – The shot dict or the shot ID.
- Returns:
Tasks assigned to current user for given shot.
- Return type:
list
- gazu.user.all_tasks_requiring_feedback(client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Get tasks requiring feedback from the current user.
- Returns:
Tasks requiring feedback.
- Return type:
list
- gazu.user.all_tasks_to_do(client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
- Returns:
Tasks assigned to current user which are not complete.
- Return type:
list
- gazu.user.check_task_subscription(task: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Check if user is subscribed to a task.
- Parameters:
task (str / dict) – The task dict or id.
- Returns:
Subscription status.
- Return type:
dict
- gazu.user.clear_avatar(client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Clear user avatar.
- gazu.user.get_context(client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Get user context.
- Returns:
User context information.
- Return type:
dict
- gazu.user.get_day_off(client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Get day off information for current user.
- Returns:
Day off information.
- Return type:
dict
- gazu.user.get_filter_group(filter_group: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Get a filter group.
- Parameters:
filter_group (str / dict) – The filter group dict or id.
- Returns:
Filter group.
- Return type:
dict
- gazu.user.get_notification(notification: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Get a specific notification.
- Parameters:
notification (str / dict) – The notification dict or id.
- Returns:
Notification.
- Return type:
dict
- gazu.user.get_task_time_spent(task: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Get time spent for a specific task.
- Parameters:
task (str / dict) – The task dict or id.
- Returns:
Time spent information for the task.
- Return type:
dict
- gazu.user.get_time_spents_by_date(date: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[source]
Get time spents for a specific date.
- Parameters:
date (str) – Date in YYYY-MM-DD format.
- Returns:
Time spents for the date.
- Return type:
list
- gazu.user.get_timespents_range(start_date: str, end_date: str, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) list[dict][source]
Gets the timespents of the current user for the given date range.
- Parameters:
start_date (str) – The first day of the date range as a date string with the following format: YYYY-MM-DD
end_date (str) – The last day of the date range as a date string with the following format: YYYY-MM-DD
- Returns:
All of the person’s time spents
- Return type:
list
- gazu.user.is_authenticated(client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) bool[source]
- Returns:
Current user authenticated or not
- Return type:
bool
- gazu.user.join_chat(chat: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Join a chat.
- Parameters:
chat (str / dict) – The chat dict or id.
- Returns:
Chat information.
- Return type:
dict
- gazu.user.leave_chat(chat: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Leave a chat.
- Parameters:
chat (str / dict) – The chat dict or id.
- gazu.user.log_desktop_session_log_in(client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Add a log entry to mention that the user logged in his computer.
- Returns:
Desktop session log entry.
- Return type:
dict
- gazu.user.mark_all_notifications_as_read(client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[Literal['success'], bool][source]
Mark all notifications as read for current user.
- Returns:
Response information.
- Return type:
dict
- gazu.user.new_filter(name: str, query: str, list_type: str, project: str | dict | None = None, entity_type: str | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Create a new filter for current user.
- Parameters:
name (str) – The filter name.
query (str) – The query for the filter.
list_type (str) – “asset”, “shot” or “edit”.
project (str / dict) – The project dict or the project ID.
entity_type (str) – “Asset”, “Shot” or “Edit”.
- Returns:
Created filter.
- Return type:
dict
- gazu.user.new_filter_group(name: str, project: str | dict | None = None, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Create a new filter group for current user.
- Parameters:
name (str) – The filter group name.
project (str / dict) – The project dict or id.
- Returns:
Created filter group.
- Return type:
dict
- gazu.user.remove_filter(filter: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Remove given filter from database.
- Parameters:
filter (str / dict) – The filter dict or the filter ID.
- gazu.user.remove_filter_group(filter_group: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Remove given filter group from database.
- Parameters:
filter_group (str / dict) – The filter group dict or id.
- gazu.user.subscribe_to_task(task: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Subscribe to a task.
- Parameters:
task (str / dict) – The task dict or id.
- Returns:
Subscription information.
- Return type:
dict
- gazu.user.unsubscribe_from_task(task: str | dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) str[source]
Unsubscribe from a task.
- Parameters:
task (str / dict) – The task dict or id.
- gazu.user.update_filter(filter: dict, client: ~gazu.client.KitsuClient = <gazu.client.KitsuClient object>) dict[source]
Save given filter data into the API.
- Parameters:
filter (dict) – Filter to save.