guardrail/clients/python/pyproject.toml
Caelum ef3b10d0a9
feat(python): operator CLI with quant smoke gate (4-language parity) (#23)
The Python SDK was the richest but had no operator CLI. Add a stdlib-only one
mirroring the TS 'guardrail' CLI and Go 'guardrailctl':

- python -m guardrail_client <status|regime|smoke|help> [--base URL] [--json]
- 'guardrail' console_scripts entry point in pyproject.toml.
- status: /health + /readiness + /regime summary; regime: regime + inputs.
- smoke: exercises all 9 quant endpoints (ta, fees, sizer, orderbook, pnl,
  correlation, equity/indicators, portfolio/risk, cmc/capabilities) and prints
  a PASS/WARN/FAIL table. Offline-safe everywhere except smoke, which is a gate
  and exits non-zero on failure (EXIT_SMOKE_FAIL=1).

The quant smoke gate now has full parity across all four surfaces: bash
(scripts/smoke_quant.sh), TS CLI, guardrailctl, and python -m guardrail_client.

Docs: Python README gains the quant-method table (incl. orderbook) and a CLI
section.

Verified live (API on 127.0.0.1:8091): py_compile clean; 'smoke' -> all 9 PASS
exit 0; 'status' renders regime/readiness/health; dead-port smoke -> exit 1;
dead-port status -> exit 0 (offline-safe preserved).
2026-06-16 19:56:10 +03:00

22 lines
621 B
TOML

[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
[project]
name = "guardrail-client"
version = "0.1.0"
description = "Stdlib-only Python client for the Guardrail Alpha read-only API."
readme = "README.md"
requires-python = ">=3.10"
license = { text = "MIT" }
# No runtime dependencies: this client uses only the Python standard library.
dependencies = []
[project.scripts]
# Installs a `guardrail` console command; also runnable as `python -m guardrail_client`.
guardrail = "guardrail_client.cli:main"
[tool.setuptools.packages.find]
where = ["."]
include = ["guardrail_client*"]