EncordUserClient Objects
ml_models
MlModelsClient
- Client for interacting with Encord’s ML models
get_dataset
- Dataset admin
- Organization admin of the project
dataset_hash
- The Dataset IDdataset_access_settings
- Set the dataset_access_settings if you would like to change the defaults.
get_project
- Project admin
- Project team manager
- Organization admin of the project
project_hash
- The Project ID
create_private_dataset
create_dataset
instead.
create_dataset
get_datasets
title_eq
- optional exact title filtertitle_like
- optional fuzzy title filter; SQL syntaxdesc_eq
- optional exact description filterdesc_like
- optional fuzzy description filter; SQL syntaxcreated_before
- optional creation date filter, ‘less’created_after
- optional creation date filter, ‘greater’edited_before
- optional last modification date filter, ‘less’edited_after
- optional last modification date filter, ‘greater’include_org_access
- if set to true and the calling user is the organization admin, the method returns all datasets in the organization.
"dataset"
and "user_role"
keys. If include_org_access is set to
True, some of the datasets may have a None
value for the "user_role"
key.
create_with_ssh_private_key
- ENCORD_SSH_KEY: environment variable with the private key content
- ENCORD_SSH_KEY_FILE: environment variable with the path to the key file
ssh_private_key
- the private key contentpassword
- private key passwordrequests_settings
- Request settings. Useful default providedssh_private_key_path
- the path to the private key filedomain
- The underlying Encord domain to connect too. Need only be changed for US or Private Clouds
get_projects
title_eq
- optional exact title filtertitle_like
- optional fuzzy title filter; SQL syntaxdesc_eq
- optional exact description filterdesc_like
- optional fuzzy description filter; SQL syntaxcreated_before
- optional creation date filter, ‘less’created_after
- optional creation date filter, ‘greater’edited_before
- optional last modification date filter, ‘less’edited_after
- optional last modification date filter, ‘greater’
"project"
and "user_role"
keys.
list_projects
title_eq
- optional exact title filtertitle_like
- optional fuzzy title filter; SQL syntaxdesc_eq
- optional exact description filterdesc_like
- optional fuzzy description filter; SQL syntaxcreated_before
- optional creation date filter, ‘less’created_after
- optional creation date filter, ‘greater’edited_before
- optional last modification date filter, ‘less’edited_after
- optional last modification date filter, ‘greater’include_org_access
- if set to true and the calling user is the organization admin, the method will return all projects in the organization.
~encord.project.Project
instances.
create_project
project_title
- the title of the Projectdataset_hashes
- a list of the Dataset uids that the project will useproject_description
- the optional description of the projectontology_hash
- the uid of an Ontology to be used. If omitted, a new empty Ontology will be createdworkflow_settings
- selects and configures the type of the quality control Workflow to use, See :class:encord.orm.project.ProjectWorkflowSettings
for details. If omitted, :class:~encord.orm.project.ManualReviewWorkflowSettings
is used.workflow_template_hash
- Project is created using a Workflow based on the template provided. If omitted, the project will be created using the default standard workflow.
get_dataset_client
get_dataset()
instead.
get_project_client
get_project()
instead.
create_project_from_cvat_start
import_method
- The chosen import method. Currently, only LocalImport is supported.dataset_name
- The name of the dataset that will be created.review_mode
- Set how much interaction is needed from the labeler and reviewer for the CVAT labels. See theReviewMode
documentation for more details.transform_bounding_boxes_to_polygons
- If True, all instances of CVAT bounding boxes will be converted to polygons in the final Encord project.
UUID
- A unique identifier for tracking the import process.
create_project_from_cvat_get_result
cvat_import_uuid
- The UUID returned by create_project_from_cvat_start.timeout_seconds
- Maximum time in seconds to wait for the import to complete. Defaults to 24 hours. The method polls the server periodically during this time.
- CvatImporterSuccess: Contains project_hash, dataset_hash, and any issues if the import succeeded.
- CvatImporterError: Contains any issues if the import failed.
ValueError
- If the server returns an unexpected status or invalid response structure.
create_project_from_cvat
import_method
- The chosen import method. Currently, only LocalImport is supported.dataset_name
- The name of the dataset that will be created.review_mode
- Set how much interaction is needed from the labeler and reviewer for the CVAT labels. See theReviewMode
documentation for more details. Defaults to ReviewMode.LABELLED.transform_bounding_boxes_to_polygons
- If True, all instances of CVAT bounding boxes will be converted to polygons in the final Encord project. Defaults to False.timeout_seconds
- Maximum time in seconds to wait for the import to complete. Defaults to 24 hours. The method polls the server periodically during this time.
- CvatImporterSuccess: Contains project_hash, dataset_hash, and any issues if the import succeeded.
- CvatImporterError: Contains any issues if the import failed.
get_cloud_integrations
-
filter_integration_uuids
- optional list of integration UUIDs to include. -
filter_integration_titles
- optional list of integration titles to include (exact match). -
include_org_access
- if set to true and the calling user is the organization admin, the method will return all cloud integrations in the organization. Iffilter_integration_uuids
andfilter_integration_titles
are both provided, the method will return the integrations that match both of the filters.
get_ontologies
title_eq
- optional exact title filtertitle_like
- optional fuzzy title filter; SQL syntaxdesc_eq
- optional exact description filterdesc_like
- optional fuzzy description filter; SQL syntaxcreated_before
- optional creation date filter, ‘less’created_after
- optional creation date filter, ‘greater’edited_before
- optional last modification date filter, ‘less’edited_after
- optional last modification date filter, ‘greater’include_org_access
- if set to true and the calling user is the organization admin, the method will return all ontologies in the organization.
"ontology"
and "user_role"
keys. If include_org_access is set to
True, some of the ontologies may have a None
value for the "user_role"
key.
create_ontology
title
str - The title of the ontology.description
str, optional - A brief description of the ontology. Defaults to an empty string.structure
Optional[OntologyStructure], optional - The structural definition of the ontology. If not provided, a default structure is used.
Ontology
- The newly created ontology object.
ValueError
- If the provided structure contains a classification without any attributes.
list_groups
deidentify_dicom_files_start
dicom_urls
- A list of URLs pointing to DICOM files to be deidentified.integration_hash
- Integration hash for the external storage integration.redact_dicom_tags
- Flag to enable or disable DICOM tags redaction. Defaults to True.redact_pixels_mode
- Policy for redacting text in pixel data. Defaults to DeidentifyRedactTextMode.REDACT_NO_TEXT.save_conditions
- Optional list of conditions that must be met for a deidentified DICOM file to be saved.upload_dir
- Optional directory for uploading deidentified files. If None, files will be uploaded to the same directory as source files.
deidentify_dicom_files_get_result
dicom_deid_uuid
- The UUID of the deidentification job returned by deidentify_dicom_files_start(…).timeout_seconds
- Maximum time to wait for job completion. Defaults to 1 day (86400 seconds).
deidentify_dicom_files
- x00080018 SOPInstanceUID
- x00100010 PatientName
- x00180050 SliceThickness
- x00180088 SpacingBetweenSlices
- x0020000d StudyInstanceUID
- x0020000e SeriesInstanceUID
- x00200032 ImagePositionPatient
- x00200037 ImageOrientationPatient
- x00280008 NumberOfFrames
- x00281050 WindowCenter
- x00281051 WindowWidth
- x00520014 ALinePixelSpacing
self
- Encord client object.dicom_urls
- a list of urls to DICOM files, for example:[ "https://s3.region-code.amazonaws.com/bucket-name/dicom-file-input.dcm" ]
integration_hash
- integration_hash parameter of Encord platform external storage integrationredact_dicom_tags
- Specifies if DICOM tags redaction should be enabled.redact_pixels_mode
- Specifies which text redaction policy should be applied to pixel data.save_conditions
- Specifies a list of conditions which all have to be true for DICOM deidentified file to be saved.upload_dir
- Specifies a directory that files will be uploaded to. By default, set to None, deidentified files will be uploaded to the same directory as source files.
[ "https://s3.region-code.amazonaws.com/bucket-name/deid_167294769118005312_dicom-file-input.dcm" ]
create_storage_folder
name
- The name of the folder.description
- The description of the folder.client_metadata
- Optional arbitrary metadata to be associated with the folder. Should be a dictionary that is JSON-serializable.parent_folder
- The parent folder of the folder; orNone
if the folder is to be created at the root level.cloud_synced_folder_params
- Passing this will create cloud synced folder, leaving this aNone
will create a normal folder for further data uploads.
encord.storage.StorageFolder
for details.
get_storage_folder
folder_uuid
- The UUID of the folder to retrieve.
encord.storage.StorageFolder
for details.
Raises:
ValueError
- Iffolder_uuid
is a badly formed UUID. :class:encord.exceptions.AuthorizationError
: If the folder with the given UUID does not exist or the user does not have access to it.
get_storage_item
item_uuid
- The UUID of the item to retrieve.sign_url
- IfTrue
, pre-fetch a signed URL for the item (otherwise the URL will be signed on demand).
encord.storage.StorageItem
for details.
Raises:
ValueError
- Ifitem_uuid
is a badly formed UUID. :class:encord.exceptions.AuthorizationError
: If the item with the given UUID does not exist or the user does not have access to it.
get_storage_items
encord.orm.dataset.DataRow.backing_item_uuid
for all data rows of a dataset.
Arguments:
item_uuids
- list of UUIDs of items to retrieve. Can be a list of strings or a list of UUID objects.sign_url
- IfTrue
, pre-fetch a signed URLs for the items (otherwise the URLs will be signed on demand).
encord.storage.StorageItem
for details. Items will be in the same order as item_uuids
in the request
Raises:
ValueError
- If any of the item uuids is a badly formed UUID. :class:encord.exceptions.AuthorizationError
: If some of the items with the given UUIDs do not exist or the user does not have access to them.
list_storage_folders
search
- Search string to filter folders by name (optional)dataset_synced
- Include or exclude folders that are mirrored by a dataset. Optional; ifNone
, no filtering is applied.org_access
- IfTrue
, and if the caller isADMIN
of their organization, the results contain the folders belonging to the organization, instead of those accessible to the user. If enabled but the user is not an organization admin, theAuthorisationError
is raised. Default value isFalse
.order
- Sort order for the folders. See :class:encord.storage.FoldersSortBy
for available options.desc
- If True, sort in descending order.page_size
- Number of folders to return per page. Default if not specified is 100. Maximum value is 1000.
encord.StorageFolder
objects.
find_storage_folders
search
- Search string to filter folders by name (optional)dataset_synced
- Include or exclude folders that are mirrored by a dataset. Optional; ifNone
, no filtering is applied.org_access
- IfTrue
, and if the caller isADMIN
of their organization, the results contain the folders belonging to the organization, instead of those accessible to the user. If enabled but the user is not an organization admin, theAuthorisationError
is raised. Default value isFalse
.order
- Sort order for the folders. See :class:encord.storage.FoldersSortBy
for available options.desc
- If True, sort in descending order.page_size
- Number of folders to return per page. Default if not specified is 100. Maximum value is 1000.
encord.StorageFolder
objects.
find_storage_items
storage_folder.list_items
instead.
Arguments:
-
search
- Search string to filter items by name. -
is_in_dataset
- Filter items by whether they are linked to any dataset.True
andFalse
select only linked and only unlinked items, respectively.None
includes all items regardless of their dataset links. -
item_types
- Filter items by type. -
org_access
- IfTrue
, and if the caller isADMIN
of their organization, the results contain the items belonging to the organization, instead of those accessible to the user. If enabled but the user is not an organization admin, theAuthorisationError
is raised. Default value isFalse
. -
order
- Sort order. -
desc
- Sort in descending order. -
get_signed_urls
- If True, return signed URLs for the items. -
page_size
- Number of items to return per page. Default if not specified is 100. Maximum value is 1000. At least one ofsearch
oritem_types
must be provided.
get_collection
collection_uuid
- The unique identifier of the collection to retrieve.
encord.collection.Collection
for details.
Raises:
ValueError
- Ifcollection_uuid
is a badly formed UUID. :class:encord.exceptions.AuthorizationError
: If the item with the given UUID does not exist or the user does not have access to it.
list_collections
top_level_folder_uuid
- The unique identifier of the top level folder.collection_uuids
- The unique identifiers (UUIDs) of the collections to retrieve.page_size
int - Number of items to return per page. Default if not specified is 100. Maximum value is 1000.
ValueError
- Iftop_level_folder_uuid
or 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_uuid
is a badly formed UUID. :class:encord.exceptions.AuthorizationError
: If the user does not have access to it.
create_collection
top_level_folder_uuid
- The unique identifier (UUID) of the folder that the collection is created in.name
- The name of the collection.description
- The description of the collection.
Collection
- Newly created collection.
ValueError
- Iftop_level_folder_uuid
is a badly formed UUID. :class:encord.exceptions.AuthorizationError
: If the user does not have access to the folder.
get_filter_preset
preset_uuid
- The unique identifier of the preset to retrieve.
encord.preset.Preset
for details.
Raises:
ValueError
- Ifpreset_uuid
is a badly formed UUID. :class:encord.exceptions.AuthorizationError
: If the item with the given UUID does not exist or the user does not have access to it.
get_filter_presets
preset_uuids
- The list of unique identifiers (UUIDs) to be retrieved.page_size
int - Number of items to return per page. Default if not specified is 100. Maximum value is 1000.
ValueError
- If any of the preset uuids is a badly formed UUID. :class:encord.exceptions.AuthorizationError
: If the user does not have access to it.
list_presets
top_level_folder_uuid
- The unique identifier of the top level folder.page_size
int - Number of items to return per page. Default if not specified is 100. Maximum value is 1000.
ValueError
- Iftop_level_folder_uuid
is a badly formed UUID. :class:encord.exceptions.AuthorizationError
: If the user does not have access to it.
create_preset
name
- The name of the preset.description
- The description of the preset.filter_preset_json
- The filters for the preset in their raw json format.
FilterPreset
- Newly created collection.
delete_preset
preset_uuid
- The uuid/id of the preset to delete.
ValueError
- Ifpreset_uuid
is a badly formed UUID. :class:encord.exceptions.AuthorizationError
: If the user does not have access to it.