Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

curvestone-0.1.0.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

curvestone-0.1.0-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

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

Hashes for curvestone-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9423d0f8bd8a9ab7d95565e8e222350fa96605bf88ddc13ffbea99c37c7e8570
MD5 326bf13924c9a51ef230e0fbf21babe3
BLAKE2b-256 6859d7fb605c9cc7c2806ea1a250b1e262d7fe3e7a50d0adbe7cdc6c298cefe6

See more details on using hashes here.

Provenance

The following attestation bundles were made for curvestone-0.1.0.tar.gz:

Publisher: publish.yml on Curvestone/curvestone-agent-api-sdk-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for curvestone-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5d1623023b534f42044f9dcc3cdb16d87aa1dc1cb45b88614fff77f33cfb762c
MD5 84e3d82655ef25772ff92fbb929a6d04
BLAKE2b-256 af84d749aeeedacfd564d541a06afa951308ed0596d924b2df4f22034eb51e1c

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page