Skip to main content

ZT 接口管理平台 CLI

Project description

zt-fop-cli

FOP/ARK 接口查询命令行工具,用于登录并搜索接口、查看接口详情与响应说明。

环境要求

  • Python >=3.10
  • 可用浏览器(首次登录会自动打开)

安装

开发安装(源码)

pip install -e .

打包发布

python -m pip install --upgrade build twine
python -m build
twine upload dist/*

快速开始

1) 登录并缓存 Token

首次运行会打开浏览器,请完成登录。成功后会从 localStorage 读取 micro-gosAdmin-Token 并缓存到本地。

zt-fop-cli login

2) 搜索接口

zt-fop-cli interface search -k 库存

3) 查看接口详情(含响应说明)

zt-fop-cli interface detail 123456

全局参数

  • -o, --output:输出格式,支持:
    • json(默认)
    • human(表格)

示例:

zt-fop-cli -o human interface search -k 订单

说明:interface detail 输出为一个合并对象,包含:

  • interface_detail:接口详情
  • interface_resp:接口响应说明

配置说明

默认配置目录:~/.zt-fop-cli

  • Token 缓存:~/.zt-fop-cli/fop_bearer_token.txt
  • 配置文件:~/.zt-fop-cli/config.yaml

可选配置项示例:

browser_channel: chromium

环境变量(可选)

支持通过环境变量自动填充登录页账号密码(如 SSO 页面字段可用):

  • ZT_SSO_USERNAME
  • ZT_SSO_PASSWORD

未设置时可在浏览器中手动完成登录。

命令一览

  • zt-fop-cli login
    • 浏览器登录并缓存 Token
  • zt-fop-cli interface search -k <keyword>
    • 模糊搜索接口
  • zt-fop-cli interface detail <interface_id> [--ability 1] [--customer-app-id PLM]
    • 查询接口详情并同时返回响应说明

Project details


Download files

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

Source Distribution

zt_fop_cli-0.0.3.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

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

zt_fop_cli-0.0.3-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file zt_fop_cli-0.0.3.tar.gz.

File metadata

  • Download URL: zt_fop_cli-0.0.3.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for zt_fop_cli-0.0.3.tar.gz
Algorithm Hash digest
SHA256 c92d1f3a9695ad5677eccf83d9659103582a18530a171b1eb46d6746849eadb3
MD5 77f0720dec1d28d9bd0582f9b926602e
BLAKE2b-256 b19a5801d491af71d1caf37182c0b88bb2ced67ca52d4d6e9c9bae1195c5cb96

See more details on using hashes here.

File details

Details for the file zt_fop_cli-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: zt_fop_cli-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for zt_fop_cli-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c4a90b285b154ba612ffc5a8b88bee1165e63992ddf4580f93aa9be1bdd81760
MD5 3e1e0f7b582b8c76ed704ff6ae98192c
BLAKE2b-256 9726341588f3c63c4a4530118dd7a928adf5876bd744daf9d72344b45e67f7ec

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