encord.client provides a simple Python client that allows you
to query project resources through the Encord API.
Here is a simple example for instantiating the client for a project
and obtaining project info:
.. test_blurb2.py code::
from encord.client import EncordClient
client = EncordClient.initialize(‘YourProjectID’, ‘YourAPIKey’)
client.get_project()
Returns:
Project- A project record instance. See Project ORM for details.
EncordClient Objects
EncordClientDataset Objects
get_dataset
OrmDataset- A dataset record instance.
AuthorisationError- If the dataset API key is invalid.ResourceNotFoundError- If no dataset exists by the specified dataset EntityId.UnknownError- If an error occurs while retrieving the dataset.
list_data_rows
title_eq- optional exact title row filtertitle_like- optional fuzzy title row filter; SQL syntaxcreated_before- optional datetime row filtercreated_after- optional datetime row filterdata_types- optional data types row filterdata_hashes- optional list of individual data unit hashes to include
List[DataRow]- A list of DataRows object that match the filter
AuthorisationError- If the dataset API key is invalid.ResourceNotFoundError- If no dataset exists by the specified dataset EntityId.UnknownError- If an error occurs while retrieving the dataset.
add_users
upload_video
create_image_group
create_dicom_series
upload_image
link_items
item_uuids- List of item UUIDs to link to the datasetduplicates_behavior- The behavior to follow when encountering duplicates. Defaults toSKIP. See also DataLinkDuplicatesBehavior
delete_data
add_private_data_to_dataset
add_private_data_to_dataset_start
add_private_data_to_dataset_get_result
update_data_item
re_encode_data
re_encode_data_status
run_ocr
EncordClientProject Objects
get_project
include_labels_metadata- if false, label row metadata information will not be returned.
OrmProject- A project record instance.
AuthorisationError- If the project API key is invalid.ResourceNotFoundError- If no project exists by the specified project EntityId.UnknownError- If an error occurs while retrieving the project.
get_project_v2
list_label_rows
add_users
copy_project
get_label_row
get_label_rows
save_label_row
save_label_rows
uids- list of label hashespayload- list of LabelRow objectsvalidate_before_saving- ????
create_label_row
create_label_rows
uids- list of data uids where label_status is NOT_LABELLED.get_signed_url- bool whether to fetch the signed url for the internal label rowbranch_name- Optional[str] which branch name against which to create the label row
List[LabelRow]- A list of created label rows

