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.

Use confirm_contract_analysis_findings(...) to record reviewer-confirmed results from one run in a single batch. The confirmations join one approved suite case per contract package, and a stale expected_suite_revision is reported as a conflict.

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; the first classify call with plain rows reads the dataset's field mapping from the server. case.get_record(key) reads one record back, and case.pending_actions() returns AgentAction objects with confirm() and reject(). classify_scores(results, truth, tree=nodes) scores classify results per tree level against a {key: code} mapping as LevelScore counts (1/2 (50%)); classify_accuracy returns the same as fractions.

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.13.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.13.0
File Size Uploaded Provenance Actions
docu_devs_api_client-1.13.0.tar.gz 363.1 kB Without provenance Details for docu_devs_api_client-1.13.0.tar.gz

Built distribution (wheel)

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

Total release size: 1.2 MB

Release files / docu_devs_api_client-1.13.0.tar.gz

Download URL docu_devs_api_client-1.13.0.tar.gz
Size 363.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d2f88ee43b5779c2038d56990bead49e178dd1e5e2cfba9ca3ccef022660bbb8
BLAKE2b-256 checksum
How to use checksums
ae154caf462c5eaec26ebd00e2b1f988a70c759d1411c8ca846995c55d3abd43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.12

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

Download URL docu_devs_api_client-1.13.0-py3-none-any.whl
Size 801.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b84ecf0d8bdd1d00650db53f4af6e35a020d5560c585c076d4ab5adb031206a3
BLAKE2b-256 checksum
How to use checksums
f2f6e2044e6d05ea11f3ccfd476ebb0b43b35464526b78da201d217a0d252d92
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.12

Security for docu-devs-api-client 1.13.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.13.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