Metadata-Version: 2.4
Name: securespoon
Version: 0.1.0
Summary: Python client for the SecureSpoon governed control plane.
License: Apache-2.0
Project-URL: Homepage, https://securespoon.com
Project-URL: Repository, https://github.com/gittergov/multitenant
Keywords: securespoon,mcp,agents,governance,api-client
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# securespoon

Python client for the [SecureSpoon](https://securespoon.com) governed control
plane. Zero dependencies (`urllib`); Python 3.9+.

SecureSpoon's server-side AND-gate does all enforcement — a client call can do
exactly what its API key's access scopes allow (`read` / `run` / `manage`),
never more, and never anything admin-only. The client adds no privilege; it
only speaks the protocol.

## Install

```bash
pip install securespoon
```

## Getting a key

Console → **Settings → API keys** → create. The secret (`ss_live_…`) is shown
**once**; the server stores only a hash. Pick the narrowest scopes that work:

| scope    | grants |
|----------|--------|
| `read`   | read-only across the workspace + verifying receipts |
| `run`    | asking agents; running workflows, applications, MCP tools, triggers |
| `manage` | everything an operator can do (never admin) |

## Usage

```python
from securespoon import SecureSpoon

client = SecureSpoon(api_key="ss_live_…", base_url="https://console.example.com")

result = client.ask(agent="support-copilot", question="What is the status of order 10432?")
print(result["answer"])

receipts = client.receipts_list()
verdict = client.receipt_verify(receipts[0])  # server-side re-sign + compare
```

`SECURESPOON_API_KEY` and `SECURESPOON_BASE_URL` environment variables are
used when the constructor arguments are omitted.

Non-2xx responses raise `SecureSpoonError` with `.status` (401 bad/expired
key, 403 out of scope, 400 invalid input) and `.messages` (the server's own
words).

## License

Apache-2.0
