Skip to main content

Docudevs api client

This is a client-library for docudevs API, the most accurate document to data service. Documentation available at docs.docudevs.ai

Contract-analysis runs may capture a package of up to 32 explicitly selected documents (including the anchor) and 32 MiB of source material. create_contract_analysis_run accepts package_members, expected_missing_documents, and excluded_documents; the CLI knowledge-base contract-analysis run-create accepts matching JSON-array files. Package member order does not establish precedence.

Finding reviews use a separate append-only record and never replace the machine assessment. Use get_contract_analysis_run_reviews(run_id) to read current dispositions and put_contract_analysis_run_review(...) with the result fingerprint, expected review revision, disposition, and idempotency key to record one. The CLI exposes the same operations as run-reviews and review; the latter accepts evidence references from a JSON file.

Use propose_contract_analysis_finding_test_case(...) to turn one captured finding into an unapproved expectation in a new suite revision. Supply the exact run/result/criterion/target identities, the reviewer-selected expected assessment, rationale, current suite revision, and an idempotency key. The captured package is copied into the proposal. Approve it explicitly, run a new scored trial, attest the report, and publish separately; proposal creation does not trigger any of those actions. The CLI equivalent is knowledge-base contract-analysis propose-test-case. If multiple suite cases share the same anchor, pass suite_case_id to create_contract_analysis_trial(...) (CLI: trial --suite-case-id) to select the exact approved case.

Installation

pip install docu-devs-api-client

Case records

Create a records case, load rows, and classify them against a category tree. Long-running calls return a job handle; the *_and_wait variants block until the job finishes.

import os

from docudevs import DocuDevsClient

api = DocuDevsClient(token=os.environ["DOCUDEVS_API_KEY"])
case = await api.create_records_case(
    "Product classification",
    key="ean",
    text=["name", "generic_name", "ingredients"],
    label="leaf",
    metadata=["brand"],
    target_depth=[1, 2, 3],
)
await case.import_records_and_wait(rows)  # dicts keyed by the field names above
await case.set_tree_and_wait(nodes, name="Taxonomy v1")

job = await case.classify_and_wait(keys=["4001", "4002"], llm_level="MINI")
for row in await job.flagged():
    await row.accept()  # or row.correct("4.1.2", reason="...") / row.feedback("...")

await case.memo.add("Oat drinks belong under 4.1", scope="4.1")
evaluation = await case.holdout_eval_and_wait({"baseline": {}, "no memo": {"memo": "none"}})
print(evaluation.report.summary())

api.records_case(case_id) returns the same handle for an existing case without making a request. classify_accuracy(results, truth) scores classify results per tree level against a {key: code} mapping.

Workbook normalization (v1)

Submit one native .xlsx workbook with a nonblank interpretation prompt. Do not provide a target schema. Poll the job, then inspect the returned dataset envelope and its issues (a dataset may be complete or needsReview). Fetch the caller-inspectable transformation plan and source map when you need provenance. The SDK does not start downstream processing automatically; choose the next step in your application.

guid = await client.submit_and_process_document(
    workbook,
    "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
    prompt="Normalize the discovered tables and preserve source references.",
    extraction_mode="WORKBOOK",
)
dataset = await client.wait_until_ready(guid, result_format="json")
if dataset.get("status") == "needsReview":
    print(dataset.get("issues", []))
plan = await client.get_workbook_plan(guid)
source_map = await client.get_workbook_source_map(guid)
summary = await client.get_workbook_summary(guid)
# Caller-controlled next step.

Workbook normalization v1 accepts exactly one workbook per job. Cross-workbook joins are a required future capability and are not silently enabled by this SDK.

Metadata

Release files for docu-devs-api-client 1.12.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 docu-devs-api-client 1.12.0
File Size Uploaded Provenance Actions
docu_devs_api_client-1.12.0.tar.gz 345.9 kB Without provenance Details for docu_devs_api_client-1.12.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for docu-devs-api-client 1.12.0
File Interpreter ABI Platform Actions
docu_devs_api_client-1.12.0-py3-none-any.whl Python 3 none any Details for docu_devs_api_client-1.12.0-py3-none-any.whl

Total release size: 1.1 MB

Release files / docu_devs_api_client-1.12.0.tar.gz

Download URL docu_devs_api_client-1.12.0.tar.gz
Size 345.9 kB
Tags Source
SHA-256 checksum
How to use checksums
999e3ce05272a17e7f1f57acd0c3ce8388d3a238f624ca07392ec13ef708b0df
BLAKE2b-256 checksum
How to use checksums
829886b48559acb472ed8845b959c2972f45af9177e462b9ee709f6c4f24461a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.12

Release files / docu_devs_api_client-1.12.0-py3-none-any.whl

Download URL docu_devs_api_client-1.12.0-py3-none-any.whl
Size 760.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
52aa09c1a4db9e2152aa21a18bd727cc11a4686d35e1a2e6a93fb1d7577353f6
BLAKE2b-256 checksum
How to use checksums
9ac4b472c141c98f29ba9bd07453bb579ad69760256bfea99009521ae6444564
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.12

Security for docu-devs-api-client 1.12.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.12.0 This release

2 release files No provenance

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