Skip to main content

CLI wrapper for SaaS APIs

Project description

bocai-cli

使用 Python + Typer 封装 SaaS API 的命令行工具。

安装

1) 本地路径安装

python -m pip install .

2) 可编辑安装(开发)

python -m pip install -e .

3) 私有 Git 安装

python -m pip install "git+<repo-url>@<tag-or-commit>"

4)使用构建生成的wheel安装

pip install xxx.whl(e.g. bocai_cli-0.1.0-py3-none-any.whl)

构建 wheel(私仓分发),同时打包依赖

python -m pip wheel . -w dist

构建后会在 dist/ 目录下生成类似 bocai_cli-0.1.0-py3-none-any.whl 的文件。

构建 wheel(私仓分发),不打包依赖

python -m pip wheel . --no-deps -w dist

构建后会在 dist/ 目录下生成类似 bocai_cli-0.1.0-py3-none-any.whl 的文件。

安装后验证

bocai-cli --help
bocai-cli auth --help
bocai-cli report --help

配置文件

Windows系统

C:\Users{用户名}.config\bocai-cli\config.toml

Linux系统

先读环境变量 BOCAI_CLI_CONFIG_PATH

没有就读默认路径:~/.config/bocai-cli/config.toml

/home/{用户名}/.config/bocai-cli\config.toml (非root用户)

/root/.config/bocai-cli\config.toml (root用户)

config.toml配置内容(base_url,app_id,secret按实际替换)

base_url = "http://10.0.0.227:10086"

app_id = "test_app_001"

secret = "test_secret_123456"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bocai_cli-0.1.4-py3-none-any.whl (29.2 kB view details)

Uploaded Python 3

File details

Details for the file bocai_cli-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: bocai_cli-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 29.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.7

File hashes

Hashes for bocai_cli-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 5c085bca8b1f410eb084897a1a763fc7b788e52f94881fc341e4bdb8b7e936fd
MD5 6b5e9a8760ad6f95f1c638df59c7c823
BLAKE2b-256 564ae9ca72a19f227744ad3f40d74d7d337d8c24fa56e4d50e78722b422835f9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page