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.

Download files

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

Source Distribution

clment_sdk-0.1.0.tar.gz (173.6 kB view details)

Uploaded Source

Built Distribution

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

clment_sdk-0.1.0-py3-none-any.whl (683.0 kB view details)

Uploaded Python 3

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

Hashes for clment_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 03135cb262b6f13b08481def9c41c2da472d25f1aaa61d5c9204a8cf5a145901
MD5 1b54525e8614ad9b41a9599917f57817
BLAKE2b-256 b078673013193803fc50e15a0910e3d3195a286460e3686d96adc1ab7c2d07ed

See more details on using hashes here.

Provenance

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

Publisher: deploy-sdk.yml on ClmentSaaS/Clment

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

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

Hashes for clment_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4db3fb7cb124e2e3e1b37ef3b8851e300d77c4d6c5f9b3567d330a521fb6e882
MD5 21594fd7bd601833080570c744e754cd
BLAKE2b-256 b6cf10515033dcf460c9bdf4e58edc521305c05d0c64b31856444cdc8171c7ef

See more details on using hashes here.

Provenance

The following attestation bundles were made for clment_sdk-0.1.0-py3-none-any.whl:

Publisher: deploy-sdk.yml on ClmentSaaS/Clment

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

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Supported by

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