Leanda命令行界面

leanda的Python项目详细描述


Leanda CLI公司

Leanda命令行界面(CLI)旨在安装在用户计算机上,并将作为Leanda平台的另一个“客户端”。在

快速启动

通过pip安装leanda cli:

pip install leanda

运行帮助命令:

^{pr2}$

对于下一个命令,您需要设置下一个环境变量: WEB_API_URLWEB_STORAGE_API_URL和{}

登录Leanda:

leanda login -u my_name -p my_password

获取类别列表:

leanda categories

运行livesync命令:

leanda livesync -l ./leanda-sync-folder

./leanda-sync-folder是本地文件夹路径。在

命令摘要

CommandUsage
^{} ^{}Allows to login and store the update session information for an Leanda user.
^{} ^{}Check authorization and explore session data.
^{} ^{}Do logout. Session data is removed.
^{} ^{}Identify current Leanda working directory.
^{} ^{}Change Leanda's current working directory.
^{} ^{}Browse remote Leanda folder.
^{} ^{}Allows to remove file or folder.
^{} ^{}Allows uploading a local file into the BLOB (raw file) store.
^{} ^{}Allows to download an Leanda file.
^{} ^{}Two-way synchronization of local folder with the Leanda user's folder.
^{} ^{}Allows to list all items from Leanda using queries.
^{} ^{}Allows to list models from Leanda using queries.
^{} ^{}Allows to list recordsets from Leanda using queries.
^{} ^{}Allows to run Machine Learning command train.
^{} ^{}Allows to run Machine Learning command predict.
^{} ^{}Allows to initialize category tree with basic structure.

登录

允许登录和重置Leanda用户的会话信息。在

login

的参数
-u, --username   your leanda username.
-p, --password   your leanda password
-v, --verbosity  set verbosity level.

示例:

leanda login -u<user-name> -p<password>
leanda login --verbosity -u<user-name> -p<password>
leanda login -v -u<user-name> -p<password>
leanda login -vv -u<user-name> -p<password>
leanda login -u<user-name> -p
Password:

哇哦

检查授权并浏览会话数据。在

whoami

的参数
-v, --verbosity  set verbosity level.

示例:

leanda whoami --verbosity
leanda whoami -vv
leanda whoami -vvv

注销

注销。会话数据已删除。在

logout

的参数

无参数

示例:

leanda logout

pwd公司

标识当前Leanda工作目录。在

pwd

的参数
-v, --verbosity  set verbosity level.

示例:

leanda pwd
leanda pwd --verbosity
leanda pwd -vv
leanda pwd -vvv

ls公司

浏览远程Leanda文件夹。在

ls

的参数
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)

示例:

leanda ls c1cc0000-5d8b-0015-e9e3-08d56a8a2e01
leanda ls 2e01
leanda ls -p10
leanda ls -s20 -2

光盘

更改Leanda当前的工作目录。在

cd

的参数
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.

示例:

leanda ls
File
    33.mol               Records(1) Processed  c1cc0000-5d8b-0015-e9e3-08d56a8a2e01
    combined lysomotroph Records(55) Processed  00160000-ac12-0242-c20e-08d56e29a481

leanda cd33
leanda cd a481
leanda cd
leanda cd ..
leanda cd c1cc0000-5d8b-0015-e9e3-08d56a8a2e01

林吉特

允许删除文件或文件夹

rm

的参数
container - Remote Leanda user's 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.

示例:

leanda rm a481
leanda rm abc
leanda rm c1cc0000-5d8b-0015-e9e3-08d56a8a2e01

上传

允许将本地文件上载到BLOB(原始文件)存储区。在

upload

的参数
container - Remote Leanda user's folder, none for 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.
-p, --path - path to local file
-n, --name - name for file
-m, --meta - path to model description in json or yaml formats
-v, --verbosity  set verbosity level.

示例:

leanda upload -p path-to-file
leanda upload -p path-to-file1 -p path-to-file2 -p path-to-file3
leanda upload -p path-to-file -n new-name to file 'filename'
leanda upload -p path-to-file -m path-to-model.json
leanda upload -p path-to-file -m path-to-model.yaml

下载

允许下载远程文件到本地主机。在

download

的参数 ^{pr21}$

示例:

leanda upload abc -o path-to-file
leanda upload a481 -f -o path-to-file1
leanda upload c1cc0000-5d8b-0015-e9e3-08d56a8a2e01 -o path-to-file

实时同步

本地文件夹与Leanda用户文件夹的双向同步。基于文件名比较文件夹。要获得更精确的比较,请参见-ul和-ur键。在

 -l, --local-folder - Path to local folder or none for current working directory
 -r, --remote-folder - 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 begining or to
                       folder id ending.
 -ul, --update-local - Compare by name and Leanda file's version
 -ur, --update-remote - Compare by name and last modification time.

示例:

leanda livesync -l abc -r c1cc0000-5d8b-0015-e9e3-08d56a8a2e01
leanda livesync -l /path/to/folder -f -r 2e01 -ul
leanda livesync -ur

项目

允许使用查询列出Leanda中的所有项目。在

  -q, --query - Filter models by subquery
  -n, --name  - Filter models by substring
  -s, --short-notation
              - Path to yaml file with list of short notations
                Example - p.radius:MachineLearningModelInfo.Fingerprints.Radius
  -v,--verbosity =0 
              - Set verbosity level. 
                -v - display query string,
                -vv - display records,
   -f, --format =(json|yaml)
              - Set model verbosity output format

示例:

leanda items
leanda items -v
leanda items -vv
leanda items -n png
leanda items -q "SubType eq 'Model' and MachineLearningModelInfo.Method eq 'Naive Bayes'"  -vv -f json
leanda items -q "type=Model,prop.chem=MOST_ABUNDANT_MASS,prop.fields=logs"  -s sample_files/short_notations.yaml
leanda items -q "SubType eq 'Model' and MachineLearningModelInfo.Fingerprints.Size gt 200"  -vv -f yaml

模型

允许使用查询列出Leanda中的模型。与items相同,但添加预设过滤器SubType eq 'Model'

示例:

leanda models
leanda models -v
leanda models -vv
leanda items -n ada
leanda models -q "MachineLearningModelInfo.Method eq 'Naive Bayes'"  -vv -f json
leanda models -q "type=Model,prop.chem=MOST_ABUNDANT_MASS,prop.fields=logs"  -s sample_files/short_notations.yaml
leanda models -q "MachineLearningModelInfo.Fingerprints.Size gt 200"  -vv -f yaml

记录集

允许使用查询列出Leanda中的记录集。与items相同,但添加预设过滤器SubType eq 'Records'

示例:

leanda recordsets
leanda recordsets -v
leanda recordsets -vv
leanda recordsets -n combined
leanda recordsets -q "MachineLearningModelInfo.Method eq 'Naive Bayes'"  -vv -f json
leanda recordsets -q "type=Model,prop.chem=MOST_ABUNDANT_MASS,prop.fields=logs"  -s sample_files/short_notations.yaml
leanda recordsets -q "MachineLearningModelInfo.Fingerprints.Size gt 200"  -vv -f yaml

火车

允许运行机器学习命令行。在

  container - Remote Leanda user's folder, none for 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.
  -m, --meta - Model metadata in json or yaml formats
  -f, --folder-name - Output folder name

示例:

leanda train 00130000-ac12-0242-0f11-08d58dbc7b8b  -f test1.model -m sample_files/train_sdf_model.yaml
leanda train 08d58dbc7b8b  -f test2.model -m sample_files/train_sdf_model.yaml
leanda train b data_solubility.sdf -f test3.model -m sample_files/train_sdf_model.yaml
leanda train data_solubility.sdf -f test4.model -m sample_files/train_sdf_model.yaml
leanda train data_solu -f test5.model -m sample_files/train_sdf_model.yaml

预测

允许运行机器学习命令预测。在

^{pr31}$

示例:

leanda predict -f folder.predict -m 7ceef61a-cf7d-41d9-a1f0-19874a2b31e9 -r 000e0000-ac12-0242-36bb-08d585329c5a

类别

允许使用基本结构初始化类别树。在

  -rm, --remove - Remove all categories
  -i, --init    - Initialize categories from categories.json file data

示例:

leanda categories #get list of categories
leanda categories -rm
leanda categories -i

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何从用户输入中找到最大值和最小值?(while循环)   java数据库资源异常   java hibernate查询速度太慢,是否忽略了延迟加载条件?   不带花括号的java IfElse控制流   nextInt()中十进制数输入的java检查   java根据REST中的资源类型发送不同的响应主体   JAVAutil。扫描器Java系统。争论中   对于单个条目,java XSLT到数组的转换失败   java将txt文档预处理为以字符串为键、整数ArrayList为值的hashmap   java获取泛型数组类类型的简单方法?   雅加达ee使用Fast Purge Open API通过java代码清除akamai中的缓存URL   java在OpenNLP中使用parseLine解析后,如何获得没有空格的名词短语作为输入句子?   设置与my GUI的自动交互之间的延迟(Java Swing)