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.2-py3-none-any.whl (23.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bocai_cli-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 23.9 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 afc42615103e017dd7fbbb709e0d9fb040f5fb3d106a91390c20b7ce73976490
MD5 aa19c9a198730689e3abe51169f96660
BLAKE2b-256 c54fae3bdeca7321a2d75db9e6e34a3f22d658f32d1aa63619a801db2704086f

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