### install Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Install (start) a pipeline. ```APIDOC ## install(pipeline, resume_option) ### Description Install (start) a pipeline. ### Parameters - **pipeline** (Pipeline) - Optional - pipeline entity - **resume_option** (PipelineResumeOption) - Optional - resume pipeline method ### Returns - **Composition** (object) - The composition object. ``` -------------------------------- ### Development Setup: Clone and Install Dependencies Source: https://github.com/dataloop-ai/dtlpy/blob/master/README.md Sets up the development environment by cloning the repository, changing into the directory, and installing dependencies from requirements.txt. ```bash git clone https://github.com/dataloop-ai/dtlpy.git cd dtlpy pip install -r requirements.txt ``` -------------------------------- ### Install a pipeline Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Installs (starts) a pipeline. Requires owner or developer permissions. ```python project.pipelines.install(pipeline='pipeline_entity') ``` -------------------------------- ### dlp development local start Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/cli.rst Starts a local development session. ```default dlp development local start [-h] [-p PORT] [-d DOCKER_IMAGE] ``` -------------------------------- ### Install DTLPY from PyPI Source: https://github.com/dataloop-ai/dtlpy/blob/master/README.md Installs the DTLPY SDK and CLI from PyPI using pip. ```bash pip install dtlpy ``` -------------------------------- ### Open recipe in web example Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Opens the recipe in the web platform. Available to all users. ```python dataset.recipes.open_in_web(recipe_id='recipe_id') ``` -------------------------------- ### Install DTLPY from GitHub Source: https://github.com/dataloop-ai/dtlpy/blob/master/README.md Installs the latest development version of DTLPY directly from the GitHub repository. ```bash pip install git+https://github.com/dataloop-ai/dtlpy.git ``` -------------------------------- ### Checkout a project Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Switches to a project by its ID. The example shows using the project_id parameter. ```python dl.projects.checkout(project_id='project_id') ``` -------------------------------- ### dlp help Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/cli.rst Gets help. ```default dlp help [-h] ``` -------------------------------- ### List recipes example Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Lists all recipes for a dataset. Requires owner or developer role. ```python dataset.recipes.list() ``` -------------------------------- ### Create recipe example Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Creates a new recipe with the given name and labels. Requires owner or developer role. ```python dataset.recipes.create(recipe_name='My Recipe', labels=labels)) ``` -------------------------------- ### Get the system project for an organization Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Fetches the system project for an organization, identified by project.systemProject == True. Org-scoped apps and services are installed here. ```python system_project = dl.projects.get_system_project(org_id='org_id') ``` -------------------------------- ### Download an item with item.download() Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/entities.rst Downloads the item with optional annotation options. The example uses dl.ViewAnnotationOptions.MASK and sets overwrite=False, thickness=1, with_text=False, alpha=1, save_locally=True, dataset_lock=False, lock_timeout_sec=300, and export_summary=False. Note the missing comma after dataset_lock=False in the original example. ```python item.download(local_path='local_path', annotation_options=dl.ViewAnnotationOptions.MASK, overwrite=False, thickness=1, with_text=False, alpha=1, save_locally=True, dataset_lock=False lock_timeout_sec=300, export_summary=False ) ``` -------------------------------- ### Create a new project Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Creates a new project with the given name. The example shows the minimal usage with project_name. ```python project = dl.projects.create(project_name='project_name') ``` -------------------------------- ### Download dataset folder with annotations Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/entities.rst Downloads a dataset folder with optional annotations. The example shows setting annotation options to JSON and MASK, and includes parameters like overwrite, thickness, with_text, alpha, save_locally, dataset_lock, lock_timeout_sec, and export_summary. Note that the example omits a comma after 'dataset_lock=False' and includes 'save_locally' which is not in the documented parameter list. ```python dataset.download_folder(folder_path='folder_path' local_path='local_path', annotation_options=[dl.ViewAnnotationOptions.JSON, dl.ViewAnnotationOptions.MASK], overwrite=False, thickness=1, with_text=False, alpha=1, save_locally=True, dataset_lock=False lock_timeout_sec=300, export_summary=False ) ``` -------------------------------- ### Clone recipe example Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Clones a recipe by its ID. Requires owner or developer role. ```python dataset.recipes.clone(recipe_id='recipe_id') ``` -------------------------------- ### list Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Gets the project's drivers list. Requires owner or developer role. ```APIDOC ## list ### Description Gets the project's drivers list. Requires owner or developer role. ### Method list ### Endpoint project.drivers.list ### Parameters None ### Request Example ```python project.drivers.list() ``` ### Response #### Success Response (200) - **drivers** (List[Driver]) - List of Driver objects #### Response Example ``` [Driver, Driver, ...] ``` ``` -------------------------------- ### Get item by ID Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Retrieves an Item object using its ID. The example shows the get method called with the item_id parameter. ```python dataset.items.get(item_id='item_id') ``` -------------------------------- ### Get service logs Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Retrieves logs for a service. Requires owner or developer role and a package. The example shows how to get logs for a service entity. ```python service_logs = package.services.log(service='service_entity') ``` -------------------------------- ### Get a service by ID Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Retrieves a service object to use in code. Requires owner or developer role and a package. The example shows how to get a service by its ID. ```python service = package.services.get(service_id='service_id') ``` -------------------------------- ### CLI: Login and List Projects and Datasets Source: https://github.com/dataloop-ai/dtlpy/blob/master/README.md CLI commands to log in, list projects, and list datasets for a specified project. ```bash dlp login dlp projects ls dlp datasets ls --project-name your-project-name ``` -------------------------------- ### deploy(service_name, package, bot, revision, init_input, runtime, pod_type, sdk_version, agent_versions, verify, checkout, module_name, project_id, driver_id, func, run_execution_as_process, execution_timeout, drain_time, max_attempts, on_reset, force, secrets, integrations, active, **kwargs) Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Deploys a service from a package. Requires owner or developer role and a package. Supports extensive configuration for runtime, scaling, and execution. ```APIDOC ## POST Service ### Description Deploys a service from a package. Requires owner or developer role and a package. Supports extensive configuration for runtime, scaling, and execution. ### Method POST ### Endpoint package.services.deploy() ### Parameters #### Path Parameters - **service_name** (str) - Optional - Service name. - **package** (Package) - Optional - Package entity. - **bot** (str) - Optional - Deprecated, ignored. - **revision** (str) - Optional - Package revision. - **init_input** (List[FunctionIO] | FunctionIO | dict) - Optional - Config to run at startup. - **runtime** (KubernetesRuntime | dict) - Optional - Runtime resources. - **pod_type** (InstanceCatalog) - Optional - Pod type. - **sdk_version** (str) - Optional - SDK version. - **agent_versions** (dict) - Optional - Versions of SDK. - **verify** (bool) - Optional - Verify inputs. - **checkout** (bool) - Optional - Checkout to service. - **module_name** (str) - Optional - Module name. - **project_id** (str) - Optional - Project ID. - **driver_id** (str) - Optional - Driver ID. - **func** (Callable) - Optional - Function to deploy. - **run_execution_as_process** (bool) - Optional - Run execution as process. - **execution_timeout** (int) - Optional - Execution timeout in seconds. - **drain_time** (int) - Optional - Drain time in seconds. - **max_attempts** (int) - Optional - Maximum execution retries. - **on_reset** (str) - Optional - What happens on reset. - **force** (bool) - Optional - Terminate old replicas immediately. - **secrets** (list) - Optional - List of integration IDs. - **integrations** (list) - Optional - List of integrations. - **active** (bool) - Optional - Activate the service. - **kwargs** - Additional arguments. ### Request Example ```python service = package.services.deploy(service_name=package_name, execution_timeout=3 * 60 * 60, module_name=module.name, runtime=dl.KubernetesRuntime( concurrency=10, pod_type=dl.InstanceCatalog.REGULAR_S, autoscaler=dl.KubernetesRabbitmqAutoscaler( min_replicas=1, max_replicas=20, queue_length=20 ) ) ) ``` ### Response #### Success Response (200) - **service** (Service) - The deployed Service object. #### Response Example ```python service = ``` ``` -------------------------------- ### Get task scores Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Retrieves all entity scores for a task. The example calls task_scores with a task_id. ```python dataset.tasks.task_scores(task_id= 'task_id') ``` -------------------------------- ### Get recipe example Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Retrieves a recipe object by its ID. Requires owner or developer role. ```python dataset.recipes.get(recipe_id='recipe_id') ``` -------------------------------- ### Create a dataset with project.datasets.create() Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Creates a new dataset. Requires owner or developer role. The example shows creating a dataset with a name and ontology ID. ```python dataset = project.datasets.create(dataset_name='dataset_name', ontology_ids='ontology_ids') ``` -------------------------------- ### Get pipeline execution with pipeline.pipeline_executions.get Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Retrieves a PipelineExecution object by its ID. Requires owner or developer permissions. The example fetches an execution using a pipeline ID. ```python pipeline_executions = pipeline.pipeline_executions.get(pipeline_id='pipeline_id') ``` -------------------------------- ### Get package revision history Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Retrieves the revision history for a package. Requires owner or developer role. The example passes a package entity to the revisions method. ```python project.packages.revisions(package='package_entity') ``` -------------------------------- ### List all services for a package Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Lists all services for a package or project. Requires owner or developer role and a package. The example shows how to list services using the package's services repository. ```python services = package.services.list() ``` -------------------------------- ### Get task items example Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Retrieves the items of a task using the task ID. Requires owner, developer, or annotation manager role with task ownership. ```python dataset.tasks.get_items(task_id= 'task_id') ``` -------------------------------- ### Deploy from File Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Deploys a package and service from a JSON file. Requires owner or developer role. ```python project.packages.deploy_from_file(project='project_entity', json_filepath='json_filepath') ``` -------------------------------- ### Get a package by ID Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Retrieves a Package object using its ID. Requires owner or developer role. The example shows the minimal call using the package_id parameter. ```python project.packages.get(package_id='package_id') ``` -------------------------------- ### deploy(package_id, package_name, package, service_name, project_id, revision, init_input, runtime, sdk_version, agent_versions, bot, pod_type, verify, checkout, module_name, run_execution_as_process, execution_timeout, drain_time, on_reset, max_attempts, force, secrets) Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Deploys a package to create a service. Requires owner or developer role. ```APIDOC ## deploy(package_id, package_name, package, service_name, project_id, revision, init_input, runtime, sdk_version, agent_versions, bot, pod_type, verify, checkout, module_name, run_execution_as_process, execution_timeout, drain_time, on_reset, max_attempts, force, secrets) ### Description Deploys a package to create a service. Requires owner or developer role. ### Method POST ### Endpoint project.packages.deploy() ### Parameters #### Path Parameters - **package_id** (str) - Optional - Package id - **package_name** (str) - Optional - Package name - **package** (Package) - Optional - Package entity - **service_name** (str) - Optional - Service name - **project_id** (str) - Optional - Project id - **revision** (str) - Optional - Package revision - default=latest - **init_input** (List[FunctionIO] | FunctionIO | dict) - Optional - Config to run at startup - **runtime** (KubernetesRuntime | dict) - Optional - Runtime resources - **sdk_version** (str) - Optional - SDK version - **agent_versions** (dict) - Optional - Versions of sdk, agent runner and agent proxy - **bot** (Bot | str) - Optional - Deprecated - ignored, bots are selected automatically by the backend - **pod_type** (InstanceCatalog) - Optional - Pod type dl.InstanceCatalog - **verify** (bool) - Optional - Verify the inputs - **checkout** (bool) - Optional - Checkout - **module_name** (str) - Optional - Module name - **run_execution_as_process** (bool) - Optional - Run execution as process - **execution_timeout** (int) - Optional - Execution timeout - **drain_time** (int) - Optional - Drain time - **on_reset** (str) - Optional - On reset - **max_attempts** (int) - Optional - Maximum execution retries in-case of a service reset - **force** (bool) - Optional - Terminate old replicas immediately - **secrets** (list) - Optional - List of the integrations ids ### Request Example ```python project.packages.deploy(service_name=package_name, execution_timeout=3 * 60 * 60, module_name=module.name, runtime=dl.KubernetesRuntime( concurrency=10, pod_type=dl.InstanceCatalog.REGULAR_S, autoscaler=dl.KubernetesRabbitmqAutoscaler( min_replicas=1, max_replicas=20, queue_length=20 ) ) ) ``` ### Response #### Success Response (200) - **service** (Service) - Service object #### Response Example ```python Service object ``` ``` -------------------------------- ### Get a bot by ID using service.bots.get() Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Retrieves a Bot object by its ID. Requires owner or developer role and a service. The example shows the expected usage: service.bots.get(bot_id='bot_id'). ```python service.bots.get(bot_id='bot_id') ``` -------------------------------- ### create(project_ids, ontology_ids, labels, recipe_name, attributes, annotation_instruction_file) Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Creates a new Recipe. If ontology_ids is None, an ontology will be created first. You must be an owner or developer. ```APIDOC ## create(project_ids, ontology_ids, labels, recipe_name, attributes, annotation_instruction_file) ### Description Creates a new Recipe. If ontology_ids is None, an ontology will be created first. You must be an owner or developer. ### Method create ### Parameters - **project_ids** (str) - Optional - project ids - **ontology_ids** (str or list) - Optional - ontology ids - **labels** - Optional - labels - **recipe_name** (str) - Optional - recipe name - **attributes** - Optional - attributes - **annotation_instruction_file** (str) - Optional - file path or url of the recipe instruction ### Returns Recipe entity ### Return Type Recipe ### Example ```python dataset.recipes.create(recipe_name='My Recipe', labels=labels) ``` ``` -------------------------------- ### Deploy a service from local folder Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Deploys a service from a local folder using a service file. The bot parameter is deprecated and ignored. Returns a Service object. ```python service = package.services.deploy_from_local_folder(cwd='file_path', service_file='service_file') ``` -------------------------------- ### dlp init Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/cli.rst Initializes a .dataloop context. ```default dlp init [-h] ``` -------------------------------- ### get(recipe_id) Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Gets a Recipe object to use in your code. You must be an owner or developer. ```APIDOC ## get(recipe_id) ### Description Gets a Recipe object to use in your code. You must be an owner or developer. ### Method get ### Parameters - **recipe_id** (str) - Required - recipe id ### Returns Recipe object ### Return Type Recipe ### Example ```python dataset.recipes.get(recipe_id='recipe_id') ``` ``` -------------------------------- ### get Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Gets a Driver object to use in your code. Requires owner or developer role. ```APIDOC ## get ### Description Gets a Driver object to use in your code. Requires owner or developer role. ### Method get ### Endpoint project.drivers.get ### Parameters #### Path Parameters - **driver_name** (str) - Optional - Search by name - **driver_id** (str) - Optional - Search by id ### Request Example ```python project.drivers.get(driver_id='driver_id') ``` ### Response #### Success Response (200) - **driver** (Driver) - Driver object #### Response Example ``` Driver object ``` ``` -------------------------------- ### get(integrations_id, organization_id=None) Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Gets an organization integration by ID. Use this method to access your integration and be able to use it in your code. ```APIDOC ## get(integrations_id: str, organization_id: str | None = None) ### Description Gets an organization integration by ID. Use this method to access your integration and be able to use it in your code. ### Method GET ### Endpoint project.integrations.get() ### Parameters #### Path Parameters - **integrations_id** (str) - Required - The ID of the integration to retrieve. #### Query Parameters - **organization_id** (str | None) - Optional - The ID of the organization. If not provided, uses the default organization. ### Request Example ```python project.integrations.get(integrations_id='integrations_id') ``` ### Response #### Success Response (200) - **integration** (Integration) - The Integration object. #### Response Example ```json { "integration": { "id": "string", "type": "string", "name": "string" } } ``` ``` -------------------------------- ### create(project_name, checkout) Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Creates a new project. Any user can create a project. ```APIDOC ## create(project_name, checkout) ### Description Creates a new project. Any user can create a project. ### Method create ### Parameters - **project_name** (*str*) - Required - The name of the project - **checkout** (*bool*) - Optional - Set the project as the default project object (cookies) ### Returns Project object ### Return Type [dtlpy.entities.project.Project](entities.md#dtlpy.entities.project.Project) ### Example ```python project = dl.projects.create(project_name='project_name') ``` ``` -------------------------------- ### get(service_name=None, service_id=None, checkout=False, fetch=None) Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Gets a service entity to use in your code. Requires owner or developer role and a package. ```APIDOC ## get(service_name=None, service_id=None, checkout=False, fetch=None) ### Description Gets a service entity to use in your code. Requires owner or developer role and a package. ### Method N/A (SDK method) ### Endpoint N/A (SDK method) ### Parameters - **service_name** (str) - Optional - Search by name - **service_id** (str) - Optional - Search by id - **checkout** (bool) - Optional - If true, checkout (switch) to service - **fetch** - Optional - Fetch entity from platform, default taken from cookie ### Returns - **Service** (dtlpy.entities.service.Service) - The service entity ### Example ```python service = package.services.get(service_id='service_id') ``` ``` -------------------------------- ### Get a Task with get Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Retrieves a task object by name or ID. Requires owner, developer, or annotation manager role assigned to the task. ```python dataset.tasks.get(task_id='task_id') ``` -------------------------------- ### Get service status Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Gets the status of a service. Requires owner or developer role and a package. Must provide service_id or service_name. Returns status JSON. ```python status_json = package.services.status(service_id='service_id') ``` -------------------------------- ### Deploy a service with runtime configuration Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Deploys a service with specified name, module, and runtime settings including concurrency, pod type, and autoscaler. Requires owner or developer role and a package. Returns a Service object. ```python service = package.services.deploy(service_name=package_name, execution_timeout=3 * 60 * 60, module_name=module.name, runtime=dl.KubernetesRuntime( concurrency=10, pod_type=dl.InstanceCatalog.REGULAR_S, autoscaler=dl.KubernetesRabbitmqAutoscaler( min_replicas=1, max_replicas=20, queue_length=20 ) ) ) ``` -------------------------------- ### Get annotation by ID with get() Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Retrieves a single annotation object by its ID. Requires an annotated item and owner/developer role or task assignment. Returns Annotation object or None. ```python annotation = item.annotations.get(annotation_id='annotation_id') ``` -------------------------------- ### Upload annotations to dataset with dataset.upload_annotations Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/entities.rst Uploads annotation files from a local folder to a dataset. Requires owner or developer role and a dataset with items related to the annotations. The local_path is the folder containing annotation files; filters can be a Filters entity or dictionary; clean=True removes old annotations; remote_root_path sets the remote root to match remote and local items; export_version V2 keeps original extension in filenames, V1 does not. For example, if the item filepath is a/b/item and remote_root_path is /a, the start folder becomes b instead of a. ```python dataset.upload_annotations(dataset='dataset_entity', local_path='local_path', clean=False, export_version=dl.ExportVersion.V1 ) ``` -------------------------------- ### PackageModule.from_entry_point Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/entities.rst Create a PackageModule entity from an entry point file. ```APIDOC ## PackageModule.from_entry_point(entry_point) ### Description Create a dl.PackageModule entity using decorator on the service class. ### Parameters - **entry_point** - path to the python file with the runner class (relative to the package path) ### Returns - **PackageModule** - The created PackageModule entity. ``` -------------------------------- ### get Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Retrieve a pipeline object. ```APIDOC ## get(pipeline_name, pipeline_id, fetch) ### Description Get Pipeline object to use in your code. You must provide at least one of pipeline_name or pipeline_id. ### Parameters - **pipeline_id** (str) - Optional - pipeline id - **pipeline_name** (str) - Optional - pipeline name - **fetch** (any) - Optional - fetch entity from platform ### Returns - **Pipeline** (object) - The pipeline object. ``` -------------------------------- ### Push local package with packages.push Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/entities.rst Pushes a local package to the platform. The example shows required parameters: package_name, modules, version, and src_path. ```python package = packages.push(package_name='package_name', modules=[module], version='1.0.0', src_path=os.getcwd()) ``` -------------------------------- ### status Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/entities.rst Get item status. ```APIDOC ## status ### Description Get item status. ### Method method ### Parameters - **assignment_id** (str) - Optional - assignment id - **task_id** (str) - Optional - task id ### Returns status ### Return Type str ### Example ```python status = item.status(task_id='task_id') ``` ``` -------------------------------- ### deploy_from_local_folder(cwd, service_file, bot, checkout, force) Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Deploys a service from a local folder in the local environment. Requires owner or developer role and a package. ```APIDOC ## POST Service ### Description Deploys a service from a local folder in the local environment. Requires owner or developer role and a package. ### Method POST ### Endpoint package.services.deploy_from_local_folder() ### Parameters #### Path Parameters - **cwd** (str) - Optional - Package working directory. Default=cwd. - **service_file** (str) - Optional - Service file. Default=None. - **bot** (str) - Optional - Deprecated, ignored. - **checkout** (bool) - Optional - Checkout flag. - **force** (bool) - Optional - Terminate old replicas immediately. ### Request Example ```python service = package.services.deploy_from_local_folder(cwd='file_path', service_file='service_file') ``` ### Response #### Success Response (200) - **service** (Service) - The deployed Service object. #### Response Example ```python service = ``` ``` -------------------------------- ### get(bot_email: str | None = None, bot_id: str | None = None, bot_name: str | None = None) Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Gets a Bot object by email, id, or name. Requires owner or developer role and a service. ```APIDOC ## get(bot_email: str | None = None, bot_id: str | None = None, bot_name: str | None = None) ### Description Gets a Bot object by email, id, or name. Requires owner or developer role and a service. ### Method get ### Parameters #### Parameters - **bot_email** (str) - Optional - Get bot by email - **bot_id** (str) - Optional - Get bot by id - **bot_name** (str) - Optional - Get bot by name ### Returns Bot object ### Return Type dtlpy.entities.bot.Bot ### Example ```python service.bots.get(bot_id='bot_id') ``` ``` -------------------------------- ### dlp mkdir -h Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/cli.rst Make a directory. Requires a name argument. ```default dlp mkdir [-h] name ``` -------------------------------- ### Open a package in the web platform Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Opens the package in the Dataloop web platform. Requires owner or developer role. The example uses the package_id parameter. ```python project.packages.open_in_web(package_id='package_id') ``` -------------------------------- ### dlp development Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/cli.rst Starts a development session. ```default dlp development [-h] {local,remote} ... ``` -------------------------------- ### LocalServiceRunner.get_mainpy_run_service Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Gets the mainpy run service. ```APIDOC ## LocalServiceRunner.get_mainpy_run_service ### Description Gets the mainpy run service. ### Method N/A (Python method) ### Endpoint N/A ### Parameters None ### Request Example N/A ### Response N/A ### Response Example N/A ``` -------------------------------- ### Create hostPath integration Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Creates a hostPath storage integration. Requires owner role. Mounts a host directory into the pod. ```python project.integrations.create_hostpath( name='my-hostpath-integration', path='/data/ml-cache', host_path_type=dl.HostPathType.DIRECTORY_OR_CREATE ) ``` -------------------------------- ### deploy_from_file(project, json_filepath) Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Deploys a package and service from a JSON file. Requires owner or developer role. ```APIDOC ## deploy_from_file(project, json_filepath) ### Description Deploys a package and service from a JSON file. Requires owner or developer role. ### Method POST ### Endpoint project.packages.deploy_from_file() ### Parameters #### Path Parameters - **project** (Project) - Required - Project entity - **json_filepath** (str) - Required - Path of the file to deploy ### Request Example ```python project.packages.deploy_from_file(project='project_entity', json_filepath='json_filepath') ``` ### Response #### Success Response (200) - **package** (Package) - The deployed package - **services** (list) - The deployed services #### Response Example ```python (package, services) ``` ``` -------------------------------- ### task_scores Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/entities.rst Get the scores of the item in a specific task. ```APIDOC ## task_scores ### Description Get the scores of the item in a specific task. ### Method method ### Parameters - **task_id** (str) - Required - The ID of the task. - **page_offset** (int) - Optional - page offset - **page_size** (int) - Optional - page size ### Returns page of scores ``` -------------------------------- ### Checkout a package with project.packages.checkout Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Switches to a package. Requires owner or developer role. The example shows passing a package entity. ```python project.packages.checkout(package='package_entity') ``` -------------------------------- ### Update integration options Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Updates an integration's options. The example shows passing an empty roleArn in new_options. The source lists valid option keys for s3, gcs, azureblob, key_value, aws-sts, aws-cross, and gcp-cross, but does not provide a full code example for each. ```python project.integrations.update(integrations_id='integrations_id', new_options={roleArn: ""}) ``` -------------------------------- ### Deploy a Package Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/repositories.rst Deploys a package as a service with runtime configuration. Requires owner or developer role. ```python project.packages.deploy(service_name=package_name, execution_timeout=3 * 60 * 60, module_name=module.name, runtime=dl.KubernetesRuntime( concurrency=10, pod_type=dl.InstanceCatalog.REGULAR_S, autoscaler=dl.KubernetesRabbitmqAutoscaler( min_replicas=1, max_replicas=20, queue_length=20 ) ) ) ``` -------------------------------- ### Recipe.get_annotation_template_id Source: https://github.com/dataloop-ai/dtlpy/blob/master/docs/entities.rst Gets the annotation template ID by template name. ```APIDOC ## Recipe.get_annotation_template_id ### Description Gets the annotation template ID by template name. ### Method get_annotation_template_id ### Parameters - **template_name** (str) - Required - Template name. ### Returns Template ID or None if it does not exist. ```