Command Line Interface

Options:

CLI for Dataloop

usage: dlp [-h] [-v]
           {shell,upgrade,logout,login,login-token,login-secret,login-m2m,init,checkout-state,help,version,api,development,projects,datasets,items,videos,app,services,triggers,deploy,generate,packages,ls,pwd,cd,mkdir,clear,exit}
           ...

Positional Arguments

operation

Possible choices: shell, upgrade, logout, login, login-token, login-secret, login-m2m, init, checkout-state, help, version, api, development, projects, datasets, items, videos, app, services, triggers, deploy, generate, packages, ls, pwd, cd, mkdir, clear, exit

supported operations

Named Arguments

-v, --version

dtlpy version

Default: False

Sub-commands:

shell

Open interactive Dataloop shell

dlp shell [-h]

upgrade

Update dtlpy package

dlp upgrade [-h] [-u ]

optional named arguments

-u, --url

Package url. default ‘dtlpy’

logout

Logout

dlp logout [-h]

login

Login using web Auth0 interface

dlp login [-h]

login-token

Login by passing a valid token

dlp login-token [-h] -t 

required named arguments

-t, --token

valid token

login-secret

Login client id and secret

dlp login-secret [-h] [-e ] [-p ] [-i ] [-s ]

required named arguments

-e, --email

user email

-p, --password

user password

-i, --client-id

client id

-s, --client-secret

client secret

login-m2m

Login client id and secret

dlp login-m2m [-h] [-e ] [-p ] [-i ] [-s ]

required named arguments

-e, --email

user email

-p, --password

user password

-i, --client-id

client id

-s, --client-secret

client secret

init

Initialize a .dataloop context

dlp init [-h]

checkout-state

Print checkout state

dlp checkout-state [-h]

help

Get help

dlp help [-h]

version

DTLPY SDK version

dlp version [-h]

api

Connection and environment

dlp api [-h] {info,setenv} ...

Positional Arguments

api

Possible choices: info, setenv

gate operations

Sub-commands:

info

Print api information

dlp api info [-h]
setenv

Set platform environment

dlp api setenv [-h] -e 
required named arguments
-e, --env

working environment

development

Start a development session

dlp development [-h] {local,remote} ...

Positional Arguments

development

Possible choices: local, remote

local development session

Sub-commands:

local

local development using docker and code-server session

dlp development local [-h] {start,pause,stop} ...
Positional Arguments
local

Possible choices: start, pause, stop

Local development session

Sub-commands:
start

Start a local development session

dlp development local start [-h] [-p PORT] [-d DOCKER_IMAGE]
optional named arguments
-p, --port

Local port for the docker connection, default: 5802

-d, --docker-image

Docker image to create. default: ‘dataloopai/dtlpy-agent:1.57.3.gpu.cuda11.5.py3.8.opencv’

pause

Pause the local development session (container pause)

dlp development local pause [-h]
stop

Stop the local development session (container kill)

dlp development local stop [-h]
remote

remote development (dl.Service) using code-server session

dlp development remote [-h]

projects

Operations with projects

dlp projects [-h] {ls,create,checkout,web} ...

Positional Arguments

projects

Possible choices: ls, create, checkout, web

projects operations

Sub-commands:

ls

List all projects

dlp projects ls [-h]
create

Create a new project

dlp projects create [-h] [-p ]
required named arguments
-p, --project-name

project name

checkout

checkout a project

dlp projects checkout [-h] [-p ]
required named arguments
-p, --project-name

project name

web

Open in web browser

dlp projects web [-h] [-p ]
optional named arguments
-p, --project-name

project name

datasets

Operations with datasets

dlp datasets [-h] {web,ls,create,checkout} ...

Positional Arguments

datasets

Possible choices: web, ls, create, checkout

datasets operations

Sub-commands:

web

Open in web browser

dlp datasets web [-h] [-p ] [-d ]
optional named arguments
-p, --project-name

project name

-d, --dataset-name

dataset name

ls

List of datasets in project

dlp datasets ls [-h] [-p ]
optional named arguments
-p, --project-name

project name. Default taken from checked out (if checked out)

create

Create a new dataset

dlp datasets create [-h] -d  [-p ] [-c]
required named arguments
-d, --dataset-name

dataset name

optional named arguments
-p, --project-name

project name. Default taken from checked out (if checked out)

-c, --checkout

checkout the new dataset

Default: False

checkout

checkout a dataset

dlp datasets checkout [-h] [-d ] [-p ]
required named arguments
-d, --dataset-name

dataset name

optional named arguments
-p, --project-name

project name. Default taken from checked out (if checked out)

items

Operations with items

dlp items [-h] {web,ls,upload,download} ...

Positional Arguments

items

Possible choices: web, ls, upload, download

items operations

Sub-commands:

web

Open in web browser

dlp items web [-h] [-r ] [-p ] [-d ]
required named arguments
-r, --remote-path

remote path

optional named arguments
-p, --project-name

project name

-d, --dataset-name

dataset name

ls

List of items in dataset

dlp items ls [-h] [-p ] [-d ] [-o ] [-r ] [-t ]
optional named arguments
-p, --project-name

project name. Default taken from checked out (if checked out)

-d, --dataset-name

dataset name. Default taken from checked out (if checked out)

-o, --page

page number (integer)

Default: 0

-r, --remote-path

remote path

-t, --type

Item type

upload

Upload directory to dataset

dlp items upload [-h] -l  [-p ] [-d ] [-r ] [-f ] [-lap ] [-ow]
required named arguments
-l, --local-path

local path

optional named arguments
-p, --project-name

project name. Default taken from checked out (if checked out)

-d, --dataset-name

dataset name. Default taken from checked out (if checked out)

-r, --remote-path

remote path to upload to. default: /

-f, --file-types

Comma separated list of file types to upload, e.g “.jpg,.png”. default: all

-lap, --local-annotations-path

Path for local annotations to upload with items

-ow, --overwrite

Overwrite existing item

Default: False

download

Download dataset to a local directory

dlp items download [-h] [-p ] [-d ] [-ao ] [-aft ] [-afl ] [-r ] [-ow]
                   [-t] [-wt] [-th ] [-l ] [-wb]
optional named arguments
-p, --project-name

project name. Default taken from checked out (if checked out)

-d, --dataset-name

dataset name. Default taken from checked out (if checked out)

-ao, --annotation-options

which annotation to download. options: json,instance,mask

-aft, --annotation-filter-type

annotation type filter when downloading annotations. options: box,segment,binary etc

-afl, --annotation-filter-label

labels filter when downloading annotations.

-r, --remote-path

remote path to upload to. default: /

-ow, --overwrite

Overwrite existing item

Default: False

-t, --not-items-folder

Download WITHOUT ‘items’ folder

Default: False

-wt, --with-text

Annotations will have text in mask

Default: False

-th, --thickness

Annotation line thickness

Default: “1”

-l, --local-path

local path

-wb, --without-binaries

Don’t download item binaries

Default: False

videos

Operations with videos

dlp videos [-h] {play,upload} ...

Positional Arguments

videos

Possible choices: play, upload

videos operations

Sub-commands:

play

Play video

dlp videos play [-h] [-l ] [-p ] [-d ]
optional named arguments
-l, --item-path

Video remote path in platform. e.g /dogs/dog.mp4

-p, --project-name

project name. Default taken from checked out (if checked out)

-d, --dataset-name

dataset name. Default taken from checked out (if checked out)

upload

Upload a single video

dlp videos upload [-h] -f  -p  -d  [-r ] [-sc ] [-ss ] [-st ] [-e]
required named arguments
-f, --filename

local filename to upload

-p, --project-name

project name

-d, --dataset-name

dataset name

optional named arguments
-r, --remote-path

remote path

Default: “/”

-sc, --split-chunks

Video splitting parameter: Number of chunks to split

-ss, --split-seconds

Video splitting parameter: Seconds of each chuck

-st, --split-times

Video splitting parameter: List of seconds to split at. e.g 600,1800,2000

-e, --encode

encode video to mp4, remove bframes and upload

Default: False

app

Operations with application

dlp app [-h] {init,add,pack,publish,update,install,pull,list} ...

Positional Arguments

app

Possible choices: init, add, pack, publish, update, install, pull, list

application operations

Sub-commands:

init

Initialize the structure in order to deploy a dpk

dlp app init [-h] [--name NAME] [--description DESCRIPTION]
             [--attributes ATTRIBUTES] [--icon ICON] [--scope SCOPE]
Optional named arguments
--name

the name of the app

--description

the description of the app

--attributes

the attributes of the app (comma separated)

--icon

the icon of the app

--scope

the scope of the app (default is organization)

add

Add component to the dataloop json file

dlp app add [-h] [--panel] [--module] [--toolbar]
Optional named arguments
--panel

builder for panel component

Default: False

--module

builder for module component

Default: False

--toolbar

builder for toolbar component

Default: False

pack

Pack the project as dpk file

dlp app pack [-h]
publish

Publish the app

dlp app publish [-h] [--project-name PROJECT_NAME] [--project-id PROJECT_ID]
Optional named arguments
--project-name

The name of the project

--project-id

The ID of the project

update

Update the app

dlp app update [-h] --app-name APP_NAME --new-version NEW_VERSION
               [--project-id PROJECT_ID] [--project-name PROJECT_NAME]
Required named arguments
--app-name

Locates the app by the name

--new-version

Sets the new version of the specified app

Required named arguments
--project-id

The id of the project

--project-name

The name of the project

install

Install the app to the platform

dlp app install [-h] --dpk-id DPK_ID [--project-id PROJECT_ID]
                [--project-name PROJECT_NAME] [--org-id ORG_ID]
Required named arguments
--dpk-id

The id of the dpk

Optional named arguments
--project-id

The id of the project

--project-name

The name of the project

--org-id

The name of the org

pull

Pull the app from the marketplace

dlp app pull [-h] --dpk-name APP_NAME
Required named arguments
--dpk-name

The name of the dpk

list

List all installed apps

dlp app list [-h] [--project-name PROJECT_NAME]
Required named arguments
--project-name

The name of the project

services

Operations with services

dlp services [-h] {execute,tear-down,ls,log,delete} ...

Positional Arguments

services

Possible choices: execute, tear-down, ls, log, delete

services operations

Sub-commands:

execute

Create an execution

dlp services execute [-h] [-f FUNCTION_NAME] [-s SERVICE_NAME]
                     [-pr PROJECT_NAME] [-as] [-i ITEM_ID] [-d DATASET_ID]
                     [-a ANNOTATION_ID] [-in INPUTS]
optional named arguments
-f, --function-name

which function to run

-s, --service-name

which service to run

-pr, --project-name

Project name

-as, --async

Async execution

Default: True

-i, --item-id

Item input

-d, --dataset-id

Dataset input

-a, --annotation-id

Annotation input

-in, --inputs

Dictionary string input

Default: “{}”

tear-down

tear-down service of service.json file

dlp services tear-down [-h] [-l LOCAL_PATH] [-pr PROJECT_NAME]
optional named arguments
-l, --local-path

path to service.json file

-pr, --project-name

Project name

ls

List project’s services

dlp services ls [-h] [-pr PROJECT_NAME] [-pkg PACKAGE_NAME]
optional named arguments
-pr, --project-name

Project name

-pkg, --package-name

Package name

log

Get services log

dlp services log [-h] [-pr PROJECT_NAME] [-f SERVICE_NAME] [-t START]
required named arguments
-pr, --project-name

Project name

-f, --service-name

Project name

-t, --start

Log start time

delete

Delete Service

dlp services delete [-h] [-f SERVICE_NAME] [-p PROJECT_NAME]
                    [-pkg PACKAGE_NAME]
optional named arguments
-f, --service-name

Service name

-p, --project-name

Project name

-pkg, --package-name

Package name

triggers

Operations with triggers

dlp triggers [-h] {create,delete,ls} ...

Positional Arguments

triggers

Possible choices: create, delete, ls

triggers operations

Sub-commands:

create

Create a Service Trigger

dlp triggers create [-h] -r RESOURCE -a ACTIONS [-p PROJECT_NAME]
                    [-pkg PACKAGE_NAME] [-f SERVICE_NAME] [-n NAME]
                    [-fl FILTERS] [-fn FUNCTION_NAME]
required named arguments
-r, --resource

Resource name

-a, --actions

Actions

optional named arguments
-p, --project-name

Project name

-pkg, --package-name

Package name

-f, --service-name

Service name

-n, --name

Trigger name

-fl, --filters

Json filter

Default: “{}”

-fn, --function-name

Function name

Default: “run”

delete

Delete Trigger

dlp triggers delete [-h] -t TRIGGER_NAME [-f SERVICE_NAME] [-p PROJECT_NAME]
                    [-pkg PACKAGE_NAME]
required named arguments
-t, --trigger-name

Trigger name

optional named arguments
-f, --service-name

Service name

-p, --project-name

Project name

-pkg, --package-name

Package name

ls

List triggers

dlp triggers ls [-h] [-pr PROJECT_NAME] [-pkg PACKAGE_NAME] [-s SERVICE_NAME]
optional named arguments
-pr, --project-name

Project name

-pkg, --package-name

Package name

-s, --service-name

Service name

deploy

deploy with json file

dlp deploy [-h] [-f JSON_FILE] [-p PROJECT_NAME]

required named arguments

-f

Path to json file

-p

Project name

generate

generate a json file

dlp generate [-h] [--option PACKAGE_TYPE] [-p PACKAGE_NAME]

optional named arguments

--option

cataluge of examples

-p, --package-name

Package name

packages

Operations with packages

dlp packages [-h] {ls,push,deploy,test,checkout,delete} ...

Positional Arguments

packages

Possible choices: ls, push, deploy, test, checkout, delete

package operations

Sub-commands:

ls

List packages

dlp packages ls [-h] [-p PROJECT_NAME]
optional named arguments
-p, --project-name

Project name

push

Create package in platform

dlp packages push [-h] [-src ] [-cid ] [-pr ] [-p ] [-c]
optional named arguments
-src, --src-path

Revision to deploy if selected True

-cid, --codebase-id

Revision to deploy if selected True

-pr, --project-name

Project name

-p, --package-name

Package name

-c, --checkout

checkout the new package

Default: False

deploy

Deploy package to platform

dlp packages deploy [-h] [-p ] [-pr ] [--module-name ] [-c]
optional named arguments
-p, --package-name

Package name

-pr, --project-name

Project name

--module-name

Package module name

Default: “default_module”

-c, --checkout

checkout the new package

Default: False

test

Tests that Package locally using mock.json

dlp packages test [-h] [-c ] [-f ]
optional named arguments
-c, --concurrency

Revision to deploy if selected True

Default: 10

-f, --function-name

Function to test

Default: “run”

checkout

checkout a package

dlp packages checkout [-h] [-p ]
required named arguments
-p, --package-name

package name

delete

Delete Package

dlp packages delete [-h] [-pkg PACKAGE_NAME] [-p PROJECT_NAME]
optional named arguments
-pkg, --package-name

Package name

-p, --project-name

Project name

ls

List directories

dlp ls [-h]

pwd

Get current working directory

dlp pwd [-h]

cd

Change current working directory

dlp cd [-h] dir

Positional Arguments

dir

mkdir

Make directory

dlp mkdir [-h] name

Positional Arguments

name

clear

Clear shell

dlp clear [-h]

exit

Exit interactive shell

dlp exit [-h]