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 advisoryestimateSeconds. -
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_usagebefore 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-Aftersays. That is urllib3's default, inherited by every generated Python client, and it happens before the exception reaches your code: aRetry-After: 300blocks 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
datearrives asvar_date. If an attribute you expect is missing, look for avar_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.
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 clment_sdk-0.1.0.tar.gz.
File metadata
- Download URL: clment_sdk-0.1.0.tar.gz
- Upload date:
- Size: 173.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03135cb262b6f13b08481def9c41c2da472d25f1aaa61d5c9204a8cf5a145901
|
|
| MD5 |
1b54525e8614ad9b41a9599917f57817
|
|
| BLAKE2b-256 |
b078673013193803fc50e15a0910e3d3195a286460e3686d96adc1ab7c2d07ed
|
Provenance
The following attestation bundles were made for clment_sdk-0.1.0.tar.gz:
Publisher:
deploy-sdk.yml on ClmentSaaS/Clment
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
clment_sdk-0.1.0.tar.gz -
Subject digest:
03135cb262b6f13b08481def9c41c2da472d25f1aaa61d5c9204a8cf5a145901 - Sigstore transparency entry: 2593556949
- Sigstore integration time:
-
Permalink:
ClmentSaaS/Clment@6110f0823af7f3ad9ac0c18b6090c0eb705e8b68 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ClmentSaaS
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy-sdk.yml@6110f0823af7f3ad9ac0c18b6090c0eb705e8b68 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file clment_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: clment_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 683.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4db3fb7cb124e2e3e1b37ef3b8851e300d77c4d6c5f9b3567d330a521fb6e882
|
|
| MD5 |
21594fd7bd601833080570c744e754cd
|
|
| BLAKE2b-256 |
b6cf10515033dcf460c9bdf4e58edc521305c05d0c64b31856444cdc8171c7ef
|
Provenance
The following attestation bundles were made for clment_sdk-0.1.0-py3-none-any.whl:
Publisher:
deploy-sdk.yml on ClmentSaaS/Clment
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
clment_sdk-0.1.0-py3-none-any.whl -
Subject digest:
4db3fb7cb124e2e3e1b37ef3b8851e300d77c4d6c5f9b3567d330a521fb6e882 - Sigstore transparency entry: 2593557020
- Sigstore integration time:
-
Permalink:
ClmentSaaS/Clment@6110f0823af7f3ad9ac0c18b6090c0eb705e8b68 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ClmentSaaS
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy-sdk.yml@6110f0823af7f3ad9ac0c18b6090c0eb705e8b68 -
Trigger Event:
workflow_dispatch
-
Statement type: