Project Objects
project_hash
status
title
description
created_at
last_edited_at
ontology
encord.Project.ontology_structure method.
This method returns the same structure as :meth:encord.Project.ontology_structure, just in
raw python dictionary format.
ontology_hash
ontology_structure
user_role
None if the user is an organizational admin and has accessed the project e.g. using
include_org_access=True of :meth:encord.user_client.UserClient.list_projects.
source_projects
datasets
encord.project.list_datasets class to work with the data.
Get the info about datasets associated with this project.
project_type
label_rows
list_label_rows_v2() method and :meth:LabelRowV2 class to work with the data.
.. code::
from encord.orm.label_row import LabelRowMetadata
project = user_client.get_project(“[project_hash]”)
label_rows = LabelRowMetadata.from_list(project.label_rows)
refetch_data
refetch_ontology
get_project
workflow
list_label_rows_v2
data_hashes- List of data hashes to filter by.label_hashes- List of label hashes to filter by.edited_before- Optionally filter to only rows last edited before the specified time.edited_after- Optionally filter to only rows last edited after the specified time.label_statuses- Optionally filter to only those label rows that have one of the specified :class:~encord.orm.label_row.AnnotationTaskStatuses.shadow_data_state- Optionally filter by data type in Benchmark QA projects. See :class:~encord.orm.label_row.ShadowDataState.data_title_eq- Optionally filter by exact title match.data_title_like- Optionally filter by fuzzy title match; SQL syntax.workflow_graph_node_title_eq- Optionally filter by exact match with workflow node title.workflow_graph_node_title_like- Optionally filter by fuzzy match with workflow node title; SQL syntax.include_workflow_graph_node- Include workflow graph node metadata in all the results. True by default.include_client_metadata- Optionally include client metadata into the result of this query.include_images_data- Optionally include image group metadata into the result of this query.include_children- Optionally include data group children rows into the result of this query.include_all_label_branches- Optionally include all label branches. They will be included as separate label row objects.branch_name- Optionally specify a branch name. A branch name cannot be specified if include_all_label_branches is set to True
~encord.objects.LabelRowV2 instances for all the matching label rows.
add_users
user_role remains unchanged. The
existing user_role is reflected in the ProjectUser instance returned.
Arguments:
user_emails- List of user emails to be added.user_role- The user role to assign to all users.
List[ProjectUser]- A list of ProjectUser objects representing the added users.
AuthorisationError- If the project API key is invalid.ResourceNotFoundError- If no project exists by the specified project EntityId.UnknownError- If an error occurs while adding the users to the project.
list_users
Iterable[ProjectUser]- An iterable of ProjectUser objects.
list_groups
Iterable[ProjectGroup]- An iterable of ProjectGroup objects.
add_group
group_hash- List of group hashes or a single group hash to be added.user_role- User role that the group will be given.
remove_group
group_hash- List of group hashes or a single group hash to be removed.
copy_project
copy_datasets- If True, the datasets of the existing project are copied over, and new tasks are created from those datasets.copy_collaborators- If True, all users of the existing project are copied over with their current roles. If label and/or annotator reviewer mapping is set, this will also be copied over.copy_models- If True, all models with their training information will be copied into the new project.copy_labels- Options for copying labels, defined inCopyLabelsOptions.new_title- When provided, will be used as the title for the new project.new_description- When provided, will be used as the description for the new project.
str- The EntityId of the newly created project.
AuthorisationError- If the project API key is invalid.ResourceNotFoundError- If no project exists by the specified project EntityId.UnknownError- If an error occurs while copying the project.
add_datasets
dataset_hashes- List of dataset hashes of the datasets to be added.
bool- True if the datasets were successfully added, False otherwise.
AuthenticationError- If the project API key is invalid.AuthorisationError- If access to the specified resource is restricted.ResourceNotFoundError- If one or more datasets don’t exist by the specified dataset_hashes.UnknownError- If an error occurs while adding the datasets to the project.OperationNotAllowed- If the write operation is not allowed by the API key.
remove_datasets
dataset_hashes- List of dataset hashes of the datasets to be removed.
bool- True if the datasets were successfully removed, False otherwise.
AuthenticationError- If the project API key is invalid.AuthorisationError- If access to the specified resource is restricted.ResourceNotFoundError- If no dataset exists by the specified dataset_hash (uid).UnknownError- If an error occurs while removing the datasets from the project.OperationNotAllowed- If the operation is not allowed by the API key.
get_project_ontology
ontology_structure property accessor instead.
Returns:
LegacyOntology- The project’s ontology.
add_object
Ontology [encord.ontology.Ontology] to manipulate ontology.
Add an object to an ontology.
ATTENTION: This legacy method will affect all the projects sharing the same ontology.
Arguments:
name- The name of the object.shape- The shape of the object. (BOUNDING_BOX, POLYGON, POLYLINE, or KEY_POINT)
bool- True if the object was added successfully, False otherwise.
AuthenticationError- If the project API key is invalid.AuthorisationError- If access to the specified resource is restricted.UnknownError- If an error occurs while adding the object to the project ontology.OperationNotAllowed- If the operation is not allowed by the API key.ValueError- If invalid arguments are supplied in the function call.
add_classification
Ontology encord.ontology.Ontology to manipulate ontology.
Add a classification to an ontology.
ATTENTION: This legacy method will affect all the projects sharing the same ontology.
Arguments:
name- The name of the classification.classification_type- The classification type (RADIO, TEXT, or CHECKLIST).required- Whether this classification is required by the annotator.options- The list of options for the classification (to be set to None for texts).
AuthenticationError- If the project API key is invalid.AuthorisationError- If access to the specified resource is restricted.UnknownError- If an error occurs while adding the classification to the project ontology.OperationNotAllowed- If the operation is not allowed by the API key.ValueError- If invalid arguments are supplied in the function call.
object_interpolation
-
key_frames- Labels for frames to be interpolated. Key frames are consumed in the form:: -
objects_to_interpolate- List of object uids (hashes) of objects to interpolate.
dict- Full set of filled frames including interpolated objects.
AuthenticationError- If the project API key is invalid.AuthorisationError- If access to the specified resource is restricted.UnknownError- If an error occurs while running interpolation.
get_data
data_hash- The uid of the data object.get_signed_url- Optionally return signed URLs for timed public access to that resource (default False).
AuthenticationError- If the project API key is invalid.AuthorisationError- If access to the specified resource is restricted.UnknownError- If an error occurs while retrieving the object.
get_label_logs
None if no filtering should be applied.
Arguments:
user_hash- Filter the label logs by the user.data_hash- Filter the label logs by the data_hash.from_unix_seconds- Filter the label logs to only include labels after this timestamp. Deprecated: use parameter after instead.to_unix_seconds- Filter the label logs to only include labels before this timestamp. Deprecated: use parameter before instead.after- Filter the label logs to only include labels after the specified time.before- Filter the label logs to only include labels before the specified time.user_email- Filter by the annotator email.
get_editor_logs
action- Filter the editor logs by action.actor_user_email- Filter the editor logs by the user email.data_unit_id- Filter the editor logs by the data id (data_hash).workflow_stage_id- Filter the editor logs by the workflow stage id.end_time- Filter the editor logs to only include logs before the specified time.start_time- Filter the editor logs to only include logs after the specified time.
get_cloud_integrations
list_label_rows
list_label_rows_v2 to manage label rows instead.
Arguments:
edited_before- Optionally filter to only rows last edited before the specified time.edited_after- Optionally filter to only rows last edited after the specified time.label_statuses- Optionally filter to only those label rows that have one of the specified AnnotationTaskStatus.shadow_data_state- Optionally filter by data type in Benchmark QA projects. See ShadowDataState.include_uninitialised_labels- Whether to return only label rows that are “created” and have a label_hash (default). If set toTrue, this will return all label rows, including those that do not have a label_hash.data_hashes- List of data hashes to filter by.label_hashes- List of label hashes to filter by.
UnknownError- If an error occurs while retrieving the data.
get_label_row
uid- A label_hash (uid) string.get_signed_url- Whether to generate signed urls to the data asset. Generating these should be disabled if the signed urls are not used to speed up the request.include_object_feature_hashes- If None all the objects will be included. Otherwise, only objects labels will be included of which the feature_hash has been added.include_classification_feature_hashes- If None all the classifications will be included. Otherwise, only classification labels will be included of which the feature_hash has been added.include_reviews- Whether to request read only information about the reviews of the label row.
LabelRow- A label row instance.
AuthenticationError- If the project API key is invalid.AuthorisationError- If access to the specified resource is restricted.ResourceNotFoundError- If no label exists by the specified label_hash (uid).UnknownError- If an error occurs while retrieving the label.OperationNotAllowed- If the read operation is not allowed by the API key.
get_label_rows
uids- A list of label_hash (uid).get_signed_url- Whether to generate signed urls to the data asset. Generating these should be disabled if the signed urls are not used to speed up the request.include_object_feature_hashes- If None all the objects will be included. Otherwise, only objects labels will be included of which the feature_hash has been added.include_classification_feature_hashes- If None all the classifications will be included. Otherwise, only classification labels will be included of which the feature_hash has been added.include_reviews- Whether to request read only information about the reviews of the label row.
MultiLabelLimitError- If too many labels were requested. Check the error’s maximum_labels_allowed field to read the most up to date error limit.AuthenticationError- If the project API key is invalid.AuthorisationError- If access to the specified resource is restricted.ResourceNotFoundError- If no label exists by the specified label_hash (uid).UnknownError- If an error occurs while retrieving the label.OperationNotAllowed- If the read operation is not allowed by the API key.
save_label_row
uid- A label_hash (uid) string.label- A label row instance.validate_before_saving- Enable stricter server-side integrity checks. Boolean,Falseby default.
bool- True if the label row is successfully saved, False otherwise.
AuthenticationError- If the project API key is invalid.AuthorisationError- If access to the specified resource is restricted.ResourceNotFoundError- If no label exists by the specified label_hash (uid).UnknownError- If an error occurs while saving the label.OperationNotAllowed- If the write operation is not allowed by the API key.AnswerDictionaryError- If an object or classification instance is missing in answer dictionaries.CorruptedLabelError- If a blurb is corrupted (e.g., if the frame labels have more frames than the video).
create_label_row
uid- The data_hash (uid) of the data unit being labeled. Available in client.get_project().get(‘label_rows’) where label_status is NOT_LABELLED.
LabelRow- A label row instance.
AuthenticationError- If the project API key is invalid.AuthorisationError- If access to the specified resource is restricted.UnknownError- If an error occurs while saving the label.OperationNotAllowed- If the write operation is not allowed by the API key.AnswerDictionaryError- If an object or classification instance is missing in answer dictionaries.CorruptedLabelError- If a blurb is corrupted (e.g., if the frame labels have more frames than the video).ResourceExistsError- If a label row already exists for this project data. Avoids overriding existing work.
create_bundle
encord.http.bundle.Bundle documentation for more details.
Arguments:
bundle_size- maximum number of items bundled. If more actions provided to the bundle, they will be automatically split into separate api calls.
Bundle- An instance of the Bundle class.
list_collaborator_timers
list_time_spent. list_time_spent provides more comprehensive and accurate information.
Provides information about time spent by each collaborator who has worked on the project within a specified range of dates.
This endpoint is deprecated and retrieves collaborator timers from the Legacy Performance Dashboards, not the Upgraded Analytics Dashboard.
Arguments:
after- The beginning of the period of interest.before- The end of the period of interest.group_by_data_unit- If True, time spent by a collaborator for each data unit is provided separately. If False, all time spent in the scope of the project is aggregated together.
CollaboratorTimer- Information about the time spent by each collaborator.
list_time_spent
start- The beginning of the period of interest.end- The end of the period of interest.workflow_stage_uuid- The UUID or list of UUIDs of the workflow stages of interest.user_email- The email or list of emails of the users of interest.
Iterable[TimeSpent]- Information about the time spent by a collaborator on a task per day.
list_datasets
Iterable[ProjectDataset]- An iterable of ProjectDataset instances.
import_coco_labels
labels_dictDict[str, Any] - A dictionary in COCO annotation format.category_id_to_feature_hashDict[CategoryID, str] - A mapping of category IDs from the COCO data to their corresponding feature hashes in the Project’s Ontology.image_id_to_frame_indexDict[ImageID, FrameIndex] - A mapping of image IDs to FrameIndex(data_hash, frame_offset), used to locate the corresponding frames in the Encord Project.branch_nameOptional[str] - Optionally specify a branch name. Defaults to themainbranch.confidence_field_nameOptional[str] - Optionally specify the name of the confidence field in the COCO annotations. Defaults to assigning1.0as confidence value to all annotations.
export_coco_labels
pip install encord[coco].
Arguments:
label_hashes- List of label hashes to include. If not provided, all label rows will be included.include_object_feature_hashes- IfNone, all objects will be included. Otherwise, only objects with the specified feature hashes will be included.include_classification_feature_hashes- IfNone, all classifications will be included. Otherwise, only classifications with the specified feature hashes will be included.branch_name- Optionally specify a branch name. Defaults to themainbranch.
ImportError- If the ‘coco’ extra dependencies are not installed.
list_collections
collection_uuids- The unique identifiers (UUIDs) of the collections to retrieve.page_sizeint - Number of items to return per page. Default if not specified is 100. Maximum value is 1000.
ValueError- If any of the collection uuids is a badly formed UUID. :class:encord.exceptions.AuthorizationError: If the user does not have access to it.
delete_collection
collection_uuid- The unique identifier (UUID) of the collection to delete.
ValueError- Ifcollection_uuidis a badly formed UUID. :class:encord.exceptions.AuthorizationError: If the user does not have access to it.
create_collection
name- The name of the collection.description- The description of the collection.collection_type- The type of the collection, could be either frame or label.
ProjectCollection- Newly created collection.
encord.exceptions.AuthorizationError : If the user does not have access to the folder.
active_sync
active_import
project_mode- Active projects can be imported up to a certain stage. Use the ActiveProjectModeEnum to select the stagevideo_sampling_rate- Optional[float]: For videos, what’s the sampling rate of frames for analysis
list_filter_presets
filter_preset_uuids- The unique identifiers (UUIDs) of the filter presets to retrieve.page_sizeint - Number of items to return per page. Default if not specified is 100. Maximum value is 1000.
ValueError- If any of the filter preset uuids is a badly formed UUID. :class:encord.exceptions.AuthorizationError: If the user does not have access to it.
set_status
status- The new status of the project.

