SpendGuard SDK and CLI
Project description
SpendGuard SDK
Public SpendGuard repository for:
- Python CLI package (
cynsta-spendguard) - Python client library (
spendguard_sdk) - API contracts (
contracts/) - Public examples and docs
Install
pip install cynsta-spendguard
or with uv:
uv tool install cynsta-spendguard
Usage
Create an agent:
spendguard agent create --name "agent-1"
List agents:
spendguard agent list
Set a budget for an existing agent:
spendguard budget set --agent <agent_id> --limit 5000 --topup 5000
Get current budget:
spendguard budget get --agent <agent_id>
Key behavior:
CAP_MODE=sidecar(default): nox-api-keyis required.CAP_MODE=hosted: API key is required via--api-keyorCAP_API_KEY.
Release
Build locally:
python -m pip install --upgrade build twine
python -m build .
python -m twine check dist/*
Publish:
- Set GitHub secret
PYPI_API_TOKEN. - Push tag
spendguard-cli-vX.Y.Z(examplespendguard-cli-v0.1.0). - GitHub Actions workflow
.github/workflows/publish-spendguard-cli.ymlpublishes to PyPI.
Maintainer setup checklist: docs/maintainer-setup.md.
Python Client
from spendguard_sdk import SpendGuardClient
client = SpendGuardClient("https://spendguard.example.com", api_key="sk_cynsta_live_...")
agent = client.create_agent("agent-1")
client.set_budget(agent["agent_id"], hard_limit_cents=5000, topup_cents=5000)
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
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 cynsta_spendguard-0.1.0.tar.gz.
File metadata
- Download URL: cynsta_spendguard-0.1.0.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
64ccb968d30124bc2e3c5570fefb1f4150d31ccd05c5c135a7671867accd687f
|
|
| MD5 |
ba5bdcd3839d21849d912f8ec3754aa7
|
|
| BLAKE2b-256 |
5729e99306160adcbfe5b70145c9b9aa02f02f851f0bdc977e7a8d10d3360184
|
File details
Details for the file cynsta_spendguard-0.1.0-py3-none-any.whl.
File metadata
- Download URL: cynsta_spendguard-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5a4fd57eceb74b93630d3eab17aafb2d580931b68f634075f8798cefb37c074
|
|
| MD5 |
a10123383a8f93c5827471d9c8b96b48
|
|
| BLAKE2b-256 |
32403cc6355eaa02aef0b617fbc93964ab1158985cdf9b61a1a9628c40b67195
|