Nova CLI - 数据集查询命令行工具
Project description
nova-cli
数据集查询命令行工具,调用 POST /jsf-app/mcpDataSet/dataSetView/query 接口。
安装
cd nova-cli
pip install -e .
配置
# 设置租户和 Token(首次使用必须配置)
nova-cli config set --tenant-id 139494637174848 --token <your_token>
# 修改 API 地址(可选,默认 https://xny-test.glodon.com)
nova-cli config set --base-url https://xny-test.glodon.com
# 查看当前配置
nova-cli config show
配置也支持环境变量覆盖:
| 环境变量 | 对应配置 |
|---|---|
NOVA_BASE_URL |
base_url |
NOVA_TENANT_ID |
tenant_id |
NOVA_TOKEN |
token |
配置文件位置:~/.nova-cli/config.json
查询
# 从命令行直接传 JSON
nova-cli query '{"dataSetCode":"xiangmu","dataSetViewCode":"xiangmu_pingpu","queryCondition":{"whereConditions":[{"name":"create_time","values":["''2025-05-01 00:00:00''","''2025-05-31 23:59:59''"],"operator":"BETWEEN"}]}}'
# 从文件读取请求体
nova-cli query -f request.json
# 简写参数(自动构造最小请求体)
nova-cli query -d xiangmu -v xiangmu_pingpu
# 输出到文件
nova-cli query -f request.json -o result.json
# 原始 JSON 输出(适合管道)
nova-cli query -f request.json --raw | jq .
# 临时覆盖认证信息
nova-cli query -f req.json --tenant-id 123 --token abc
快速测试
# 使用内置示例 body 发起查询
nova-cli demo
请求体结构
{
"dataSetCode": "xiangmu",
"dataSetViewCode": "xiangmu_pingpu",
"queryCondition": {
"whereConditions": [
{
"name": "create_time",
"values": ["'2025-05-01 00:00:00'", "'2025-05-31 23:59:59'"],
"operator": "BETWEEN"
},
{
"name": "tenant_id",
"values": "139494637174848",
"operator": "EQUALS"
}
],
"dimensions": ["business_type"]
}
}
请求头
| Header | 值 | 来源 |
|---|---|---|
Content-Type |
application/json |
固定 |
x-coral-tenant |
租户 ID | config tenant_id |
Authorization |
Bearer <token> |
config token |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gld_nova_cli-0.1.0.tar.gz
(6.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gld_nova_cli-0.1.0.tar.gz.
File metadata
- Download URL: gld_nova_cli-0.1.0.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45e69aa56c6bc7811e1cdadd3f745aa94be35b02c7df3c52779b4abc8504c297
|
|
| MD5 |
00beb4ed17a86e412a6b786d130555f3
|
|
| BLAKE2b-256 |
7e49da411849b778c75eac2571ca9244626512313761d266b687ba0157afa6ab
|
File details
Details for the file gld_nova_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: gld_nova_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b10f374b86d868f8d757e13a9d6dd842e55a9848eab6077afa10771df3b53c73
|
|
| MD5 |
2df33cf5295ff8cfcb64cc4a658e569b
|
|
| BLAKE2b-256 |
0cb41bd0943b3cd1aec95f04c9f0355dfbcff387a140532d6d38e8dccbd8059e
|