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

Uploaded Python 3

File details

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

File metadata

  • Download URL: bocai_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 21.8 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 90e006c8460ac576c2375c9beb9d41fec2cd93b1b46ca008e10f01528adf6217
MD5 9cb5c72be345ea0c145d7cce07d6c15d
BLAKE2b-256 56beb0a736f3bfa46236293df860788b1666ba7eadbc7c8ba7a6be43d2ab88d2

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