Keel Python SDK
from keel import Keel
ops = Keel("https://keel.codes", token="<your-bearer-token>")
print(ops.health())
# 登录获取 token(自托管模式)
result = ops.login("admin", "password")
print(result["access_token"])
# Agents / 告警 / 指标
agents = ops.list_agents()
alerts = ops.list_alerts(limit=10)
metrics = ops.get_metrics(project="my-project")
# Docker
status = ops.docker_status()
containers = ops.docker_containers()
# AI 运维对话
reply = ops.chat("磁盘快满了怎么办?")
安装
pip install keel-python
认证
- 平台管理员:
Keel(base, token=...)直接传平台 API Key - 用户模式:
login(username, password)后自动携带 Bearer token
Metadata
Release files for keel-python 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| keel_python-0.1.0.tar.gz | 3.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| keel_python-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.4 kB
Release files / keel_python-0.1.0.tar.gz
| Download URL | keel_python-0.1.0.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a48995b163605d160a535e5664f369c48541b7cde890042723c37e390e16d626
|
|
BLAKE2b-256 checksum How to use checksums |
e453ba563e1b9ea60a9f026bbd622e5a90768b65b7a17243bb162ea8d6e86623
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.12
|
Release files / keel_python-0.1.0-py3-none-any.whl
| Download URL | keel_python-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
254c99538dfaa88efb4d3e8edb2405fa70e6aff12a56424d4fe1439d5a6cfec1
|
|
BLAKE2b-256 checksum How to use checksums |
38144331409b5d94644b1930708f051f62f6826548f3e08842849f375f2df3f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.12
|