Leanda Command Line Interface (CLI) is intended for installation on users computers and will serve as another "client" for Leanda platform.
Install leanda-cli via pip:
pip install leandaRun help command for installation test:
leanda --helpFor the next commands you need to set the next environment variables or it will set as default dev env if ommited:
LEANDA_WEB_CORE_API_URL
LEANDA_WEB_BLOB_API_URL
LEANDA_WEB_SOCKET_URL
LEANDA_IDENTITY_SERVER_URL
LEANDA_FILE_UPLOAD_LIMIT
LEANDA_FILE_DOWNLOAD_LIMIT
Login to Leanda:
leanda login -u my_name -p my_password
./leanda-sync-folder is a local folder path.
| Command | Usage |
|---|---|
leanda login |
Allows to login and store the update session information for an Leanda user. |
leanda whoami |
Check authorization and explore session data. |
leanda logout |
Do logout. Session data is removed. |
leanda pwd |
Identify current Leanda working directory. |
leanda cd |
Change Leanda's current working directory. |
leanda ls |
Browse remote Leanda folder. |
leanda rm |
Allows to remove file or folder. |
leanda upload |
Upload local direcory or file list to remote folder. |
leanda download |
Allows to download an Leanda file. |
leanda livesync |
Two-way synchronization of local folder with the Leanda user's folder. |
leanda items |
Allows to list all items from Leanda using queries. |
leanda models |
Allows to list models from Leanda using queries. |
leanda recordsets |
Allows to list recordsets from Leanda using queries. |
leanda train |
Allows to run Machine Learning command train. |
leanda predict |
Allows to run Machine Learning command predict. |
leanda categories |
Allows to initialize category tree with basic structure. |
Allows to login and reset session information for an Leanda user.
-u, --username your leanda username.
-p, --password your leanda passwordExamples:
leanda login -u<user-name> -p<password>Check authorization and explore user data.
Examples:
leanda whoamiDo logout. Session data is removed.
No parameters
Examples:
leanda logoutIdentify current Leanda working directory.
-v, --verbosity set verbosity level.Examples:
leanda pwd
leanda pwd --verbosity
leanda pwd -vv
leanda pwd -vvvBrowse remote Leanda folder.
container - Remote Leanda user's folder or none for current working folder.
Leanda user's folder can be choosed by its full id system wide
or by substring for subfolders in current folder.
Substring compared to folder name starting from the beggining
or to folder id ending.
-s, --size - Report page length (default value 10)
-p, --page - Report page number (default value 1)Examples:
leanda ls c1cc0000-5d8b-0015-e9e3-08d56a8a2e01
leanda ls 2e01
leanda ls -p10
leanda ls -s20 -2Change Leanda's current working directory.
container - Remote Leanda user's folder, none for home folder or '..' for
parent folder. Leanda user's folder can be choosed by its full id
system wide or by substring for subfolders in current folder.
Substring compared to folder name starting from the beggining
or to folder id ending.Examples:
leanda ls
File
33.mol Records( 1) Processed c1cc0000-5d8b-0015-e9e3-08d56a8a2e01
combined lysomotroph Records( 55) Processed 00160000-ac12-0242-c20e-08d56e29a481
leanda cd 33
leanda cd a481
leanda cd
leanda cd ..
leanda cd c1cc0000-5d8b-0015-e9e3-08d56a8a2e01Allows to remove file or folder
Examples:
leanda rm c1cc0000-5d8b-0015-e9e3-08d56a8a2e01Upload local direcory or file list to remote folder.
Examples:
leanda upload -r c1cc0000-5d8b-0015-e9e3-08d56a8a2e01 -l local_folder
leanda upload -l local_folderDownload remote folder or file list to local directory.
Examples:
leanda download -r c1cc0000-5d8b-0015-e9e3-08d56a8a2e01 -l local_folder
leanda download -l local_folderSync local direcory with remote folder.
Examples:
leanda livesync -l abc -r c1cc0000-5d8b-0015-e9e3-08d56a8a2e01Allows to initialize category tree with basic structure.
-rm, --remove - Remove all categories
-i, --init - Initialize categories from categories.json file dataExamples:
leanda categories #get list of categories
leanda categories -rm
leanda categories -i
pip install virtualenv --uservirtualenv venv# on Mac OS X or Linux
. venv/bin/activate
# on Windows
venv\scripts\activatepip install -r requirements.txtpip install --editable .leanda --help