Source code for project_export_client

[docs]def export_project_tasks(project_id,export_note): """ Export tasks from a project. :table:Input parameters summary: +---------------+------------------+--------------------------------------------------------+ | Field | Type | Description | +===============+==================+========================================================+ | project_id | str | The Id of the project that the exported task belongs to| +---------------+------------------+--------------------------------------------------------+ | export_note | str | The note provided when the task was exported. | +---------------+------------------+--------------------------------------------------------+ Sample Request Body .. code-block:: python from pprint import pprint from tensoract.client import Tensoract # Initialize Tensoract client project_export_client = Tensoract(api_url="YOUR_API_URL",api_key="YOUR_API_KEY") projects = project_export_client.export_project_tasks(project_id="1e80e389c318d5746169c5b6",export_note="This is test export via API"), pprint(projects) :table:Response summary: +------------+------------------+-----------------------------------------------+ | Field | Type | Description | +============+==================+===============================================+ | progress | str | The progress of the export (e.g. "100%"). | +------------+------------------+-----------------------------------------------+ | message | str | A message about the export status. | +------------+------------------+-----------------------------------------------+ | export_url | str | The URL to download the exported project file.| +------------+------------------+-----------------------------------------------+ Sample Response .. code-block:: python { "progress": "100%", "message": "Use the export_url to download the project export file", "export_url": "https://devdocuments.objectways.com/export_testner3_2023-03-11T06:17:12.4972567.manifest" } """
[docs]def list_project_exports(project_id): """ List all exports for a dataset. :table:Input parameters summary: +--------------+----------+-------+--------------------------------------------------+ | Field | Input | Type | Description | +==============+==========+=======+==================================================+ | project_id | body | str |The ID of the project to list exports for | +--------------+----------+-------+--------------------------------------------------+ Sample Request Body .. code-block:: python from pprint import pprint from tensoract.client import Tensoract # Initialize Tensoract client project_export_client = Tensoract.Tensoract(api_url="YOUR_API_URL",api_key="YOUR_API_KEY") response = project_export_client.list_project_exports( project_id="449354de1168469a8229f605") pprint(response) :table:Response summary: +---------------+-------------------+----------------------------------------------------+ | Field | Type | Description | +===============+===================+====================================================+ | exportId | str | The ID of the exported project. | +---------------+-------------------+----------------------------------------------------+ | created | int | The timestamp when the export was created. | +---------------+-------------------+----------------------------------------------------+ | createdBy | str | The email address of the user who created the | | | | export | +---------------+-------------------+----------------------------------------------------+ | note | str | The note provided when the project was exported. | +---------------+-------------------+----------------------------------------------------+ | project | str | The ID of the exported project. | +---------------+-------------------+----------------------------------------------------+ | selection | bool | Whether the export was a selection or a full export| +---------------+-------------------+----------------------------------------------------+ | items | int | The number of items in the export. | +---------------+-------------------+----------------------------------------------------+ | filter | str | The filter applied to the export. | +---------------+-------------------+----------------------------------------------------+ | projectName | str | The name of the exported project. | +---------------+-------------------+----------------------------------------------------+ Sample Response .. code-block:: python [ { "exportId": "2023-03-11T06:54:50.1371301", "created": 1678517690, "createdBy": "abc@example.com", "note": "note", "project": "f9af04fc0315e4f536c849b1", "selection": false, "items": 1, "filter": "", "projectName": "Bulk Project" }, { "exportId": "2023-03-11T06:55:28.6315616", "created": 1678517729, "createdBy": "abc@example.com", "note": "note1", "project": "f9af04fc0315e4f536c849b1", "selection": false, "items": 1, "filter": "", "projectName": "Bulk Project" } ] """
[docs]def download_project_export(export_id): """ Downloads the project export. :table:Input parameters summary: +--------------+----------+-------+--------------------------------------------------+ | Field | Input | Type | Description | +==============+==========+=======+==================================================+ | export_id | body | str |The ID of the export to be downloaded | +--------------+----------+-------+--------------------------------------------------+ Sample Request Body .. code-block:: python from pprint import pprint from tensoract.client import Tensoract # Initialize Tensoract client project_export_client = Tensoract(api_url="YOUR_API_URL",api_key="YOUR_API_KEY") response = project_export_client.download_project_export(export_id="2023-03-11T06:55:28.6315616") pprint(response) .. table:Response summary +------------+------------------+-----------------------------------------------+ | Field | Type | Description | +============+==================+===============================================+ | status | str | The status of the export (e.g. "COMPLETED"). | +------------+------------------+-----------------------------------------------+ | progress | str | The progress of the export (e.g. "100%"). | +------------+------------------+-----------------------------------------------+ | message | str | A message about the export status. | +------------+------------------+-----------------------------------------------+ | export_url | str | The URL to download the exported project file.| +------------+------------------+-----------------------------------------------+ Sample Response .. code-block:: python { "status": "COMPLETED", "progress": "100%", "message": "Use the export_url to download the project export file", "export_url": "https://devdocuments.objectways.com/export_2023-03-11T06:54:50.1371301_bulkproject.manifest" } """