Skip to main content

robodock-cli robodock平台命令行&sdk工具

安装

方式一:本地源码安装(推荐)

cd robodock-cli
pip install .

方式二:构建 wheel 后安装

cd robodock-cli
pip install build
python -m build
pip install dist/robodock_cli-*.whl

Quick Start

# 登录
robodock-cli auth login

# 查看登录信息
robodock-cli auth info

# 退出登录
robodock-cli auth logout

# 下载平台模型
robodock-cli task download_checkpoint [run_uuid] [checkpoint_prefix]

# 查看全部命令
robodock-cli --help

开发调试时也可以继续使用 python main.py,例如 python main.py auth info。

整体架构

  • app
    • typer命令行工具
  • fast_api_client
    • 由openapi.json生成的client代码(不要手动修改里面的文件)
  • sdk
    • client以及工具封装
  • config.py
    • 全局配置(服务地址、登录态文件路径等)

注意:config.py 会以顶层模块的形式打包进 wheel,若与其他包同名可能冲突。

开发依赖

pip install -r requirements.txt

生成后端client

openapi-python-client generate --path ./openapi.json --overwrite
rm -rf ./fast_api_client
cp -r fast-api-client/fast_api_client/ ./fast_api_client/

注意fast_api_client目录是由openapi文件生成的,不要修改里面的文件,每次生成都会被覆盖

上传pypi

pip install -e ".[dev]"

python -m build

python -m twine upload dist/*

Metadata

Release files for robodock-cli 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for robodock-cli 0.1.4
File Size Uploaded
robodock_cli-0.1.4.tar.gz 56.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for robodock-cli 0.1.4
File Interpreter ABI Platform
robodock_cli-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 234.8 kB

Release files / robodock_cli-0.1.4.tar.gz

Download URL robodock_cli-0.1.4.tar.gz
Size 56.2 kB
Tags Source
SHA-256 checksum
How to use checksums
8897577804de715f182a24b3e6308788fd9a19a49ac444a11d537bcc5bc5d153
BLAKE2b-256 checksum
How to use checksums
de3ca92d217c4f539916f270403a745f02a87e266e9ba9be8bfae3b3205a224c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.21

Release files / robodock_cli-0.1.4-py3-none-any.whl

Download URL robodock_cli-0.1.4-py3-none-any.whl
Size 178.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fbe365143947b5532c23296d3cc6d026f134350977233203d83ff7d7a7a7fc5e
BLAKE2b-256 checksum
How to use checksums
df82fd67d2dda88c12a6e16ecce466b4bb2f809264fe73ecc51fd57a997a0f27
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.21

Release history Release notifications | RSS feed

0.1.5

2 release files

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page