Python SDK for the Curvestone compliance API
Project description
Curvestone Python SDK
Python client for the Curvestone compliance API.
Installation
pip install curvestone
Quick Start
from curvestone import Agent
agent = Agent() # reads CURVESTONE_API_KEY env var
result = agent.check(
case_type="residential_mortgage",
depth="full_check",
documents=[open("fact_find.pdf", "rb"), open("suitability.pdf", "rb")],
)
print(result.triage) # "green" | "amber" | "red"
print(result.summary) # Executive summary
print(result.findings) # List of Finding objects
print(result.stats) # Stats(green=35, amber=5, red=2)
Low-Level Client
For more control, use the resource-based client (similar to Stripe/Anthropic SDKs):
from curvestone import Curvestone
client = Curvestone(api_key="cs_live_...")
# Upload files
f = client.files.upload(open("fact_find.pdf", "rb"), purpose="check_document")
# Submit a check
job = client.checks.create(
case_type="residential_mortgage",
depth="full_check",
file_ids=[f.file_id],
)
# Poll until complete
result = client.jobs.poll(job.job_id)
print(result.status) # "completed"
print(result.result) # Full result dict
Async Support
Every method has an async equivalent:
from curvestone import AsyncAgent
async def main():
agent = AsyncAgent()
result = await agent.check(
case_type="residential_mortgage",
depth="admin_check",
documents=[open("fact_find.pdf", "rb")],
)
print(result.triage)
Available Resources
| Resource | Methods |
|---|---|
client.checks |
create() |
client.jobs |
retrieve(), list(), cancel(), poll(), stream() |
client.files |
upload(), retrieve(), delete() |
client.ask |
create() |
client.generate |
create() |
client.monitors |
create(), retrieve(), list(), update(), delete(), run() |
client.webhooks |
create(), retrieve(), list(), update(), delete(), test() |
Configuration
from curvestone import Curvestone
client = Curvestone(
api_key="cs_live_...", # or set CURVESTONE_API_KEY env var
base_url="https://...", # default: https://agent.curvestone.ai/agent
timeout=120.0, # request timeout in seconds (default: 60)
max_retries=3, # retries on 429/5xx (default: 2)
)
Documentation
Full API documentation: hub.curvestone.ai/docs
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 curvestone-0.1.0.tar.gz.
File metadata
- Download URL: curvestone-0.1.0.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9423d0f8bd8a9ab7d95565e8e222350fa96605bf88ddc13ffbea99c37c7e8570
|
|
| MD5 |
326bf13924c9a51ef230e0fbf21babe3
|
|
| BLAKE2b-256 |
6859d7fb605c9cc7c2806ea1a250b1e262d7fe3e7a50d0adbe7cdc6c298cefe6
|
Provenance
The following attestation bundles were made for curvestone-0.1.0.tar.gz:
Publisher:
publish.yml on Curvestone/curvestone-agent-api-sdk-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
curvestone-0.1.0.tar.gz -
Subject digest:
9423d0f8bd8a9ab7d95565e8e222350fa96605bf88ddc13ffbea99c37c7e8570 - Sigstore transparency entry: 976559409
- Sigstore integration time:
-
Permalink:
Curvestone/curvestone-agent-api-sdk-python@56d934eeed2ad7f7fa44fa041420ceef2d7af045 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Curvestone
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@56d934eeed2ad7f7fa44fa041420ceef2d7af045 -
Trigger Event:
release
-
Statement type:
File details
Details for the file curvestone-0.1.0-py3-none-any.whl.
File metadata
- Download URL: curvestone-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d1623023b534f42044f9dcc3cdb16d87aa1dc1cb45b88614fff77f33cfb762c
|
|
| MD5 |
84e3d82655ef25772ff92fbb929a6d04
|
|
| BLAKE2b-256 |
af84d749aeeedacfd564d541a06afa951308ed0596d924b2df4f22034eb51e1c
|
Provenance
The following attestation bundles were made for curvestone-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on Curvestone/curvestone-agent-api-sdk-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
curvestone-0.1.0-py3-none-any.whl -
Subject digest:
5d1623023b534f42044f9dcc3cdb16d87aa1dc1cb45b88614fff77f33cfb762c - Sigstore transparency entry: 976559415
- Sigstore integration time:
-
Permalink:
Curvestone/curvestone-agent-api-sdk-python@56d934eeed2ad7f7fa44fa041420ceef2d7af045 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Curvestone
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@56d934eeed2ad7f7fa44fa041420ceef2d7af045 -
Trigger Event:
release
-
Statement type: