Skip to main content

Clment Python SDK

Official client for the Clment contract-intelligence API. Generated from the published OpenAPI document, so it cannot drift from the API it calls.

pip install clment-sdk

Get the region right

Your contracts and your API keys live in exactly one region, and a valid key sent to the wrong region fails exactly like an invalid one — a 401 that sends people hunting for a new key when the host was the problem. Set the base URL for your own region:

Region Base URL
United States https://api-us.clment.com/v1
European Union https://api-eu.clment.com/v1
United Kingdom https://api-uk.clment.com/v1
Australia https://api-au.clment.com/v1
New Zealand https://api-nz.clment.com/v1
Canada https://api-ca.clment.com/v1

Your region is shown in Settings → API & Integrations.

First call

import os
import clment_sdk
from clment_sdk.api.contracts_api import ContractsApi

configuration = clment_sdk.Configuration(
    # Your organisation's region: us | eu | uk | au | nz | ca
    host="https://api-nz.clment.com/v1",
)
configuration.access_token = os.environ["CLMENT_API_KEY"]

with clment_sdk.ApiClient(configuration) as client:
    page = ContractsApi(client).list_contracts(status="active", take=20)
    print(f"{len(page.data.contracts)} of {page.data.total} active contracts")

Things worth knowing

  • Long-running work returns a job id. Uploads, reviews and redlines run in the background: call the start operation, then poll the matching job operation until it reports complete. A review runs for minutes; the start response carries an advisory estimateSeconds.

  • Uploads are not idempotent. The same file twice creates two contracts. Keep a record of what you have sent.

  • AI operations consume credits; reads are free. Check GetUsage / get_usage before a batch rather than discovering exhaustion as a 402 halfway through one.

  • Rate limits arrive as 429 with Retry-After. Retry 429, 5xx and connection failures; a 401, 403 or 404 will not fix itself.

  • This client already retries 429 for you — three times, sleeping for whatever Retry-After says. That is urllib3's default, inherited by every generated Python client, and it happens before the exception reaches your code: a Retry-After: 300 blocks your thread for fifteen minutes with no output. If your service needs to react to a 429 itself — shed load, switch queue, raise an alert — turn it off and handle the status yourself:

    configuration.retries = 0
    

    The TypeScript SDK does the opposite: it raises immediately and hands you the delay to act on.

  • Comparing two versions is a review with scope: two_version, not a separate endpoint.

  • A few field names are escaped by the generator. Where a name would collide with something in the target language it is renamed rather than dropped — a key date's date arrives as var_date. If an attribute you expect is missing, look for a var_ prefix.

Documentation

Building in TypeScript or JavaScript? Use @clment/sdk instead — it is hand-written over generated types and has a friendlier surface.

Licence

MIT © Contract Eagle Limited, trading as Clment.

Metadata

Release files for clment-sdk 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for clment-sdk 0.1.0
File Size Uploaded
clment_sdk-0.1.0.tar.gz 173.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for clment-sdk 0.1.0
File Interpreter ABI Platform
clment_sdk-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 856.6 kB

Release files / clment_sdk-0.1.0.tar.gz

Download URL clment_sdk-0.1.0.tar.gz
Size 173.6 kB
Tags Source
SHA-256 checksum
How to use checksums
03135cb262b6f13b08481def9c41c2da472d25f1aaa61d5c9204a8cf5a145901
BLAKE2b-256 checksum
How to use checksums
b078673013193803fc50e15a0910e3d3195a286460e3686d96adc1ab7c2d07ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.

Transparency log

Release files / clment_sdk-0.1.0-py3-none-any.whl

Download URL clment_sdk-0.1.0-py3-none-any.whl
Size 683.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4db3fb7cb124e2e3e1b37ef3b8851e300d77c4d6c5f9b3567d330a521fb6e882
BLAKE2b-256 checksum
How to use checksums
b6cf10515033dcf460c9bdf4e58edc521305c05d0c64b31856444cdc8171c7ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page