Skip to main content

Thin Python client for the Provenarium extraction API.

Project description

Provenarium Python Client

provenarium_client is a thin Python wrapper around the public Provenarium API.

It is intentionally focused on the main data-team workflow:

  • list, create, and rotate machine API keys
  • create, suggest, or reuse schemas
  • submit extraction jobs
  • poll for results
  • request hosted review for completed work
  • manage webhook destinations

Full guide: docs.provenarium.com/python-client

Install

If the client is being distributed through PyPI for your environment:

pip install provenarium-client

Otherwise install it from the wheel, source checkout, or private package path provided for your environment.

The client defaults to https://api.provenarium.com. Only override base_url when pointing at a local or non-default hosted environment.

Quickstart

from provenarium_client import SchemaField, ProvenariumClient

with ProvenariumClient(
    api_key="pk_live_...",
) as client:
    schema = client.create_schema(
        name="Quality Packet",
        description="Fields to pull from quality packets.",
        fields=[
            SchemaField(
                name="document_id",
                display_name="Document ID",
                description="Internal document identifier.",
                group="document_info",
                path="document_info.document_id",
                field_type="String",
            ),
            SchemaField(
                name="record_id",
                display_name="Record ID",
                description="Operational record identifier.",
                group="record_context",
                path="record_context.record_id",
                field_type="String",
            ),
        ],
    )

    job = client.submit_job(
        file_path="packet.pdf",
        schema_id=schema.id,
    )

    result = client.wait_for_result(
        job.id,
        poll_interval_seconds=2.0,
        timeout_seconds=120.0,
    )

    print(result.summary.field_count)
    print(result.fields[0].value)

Hosted Review

Route a completed job into hosted review later:

from provenarium_client import ProvenariumClient

with ProvenariumClient(api_key="pk_live_...") as client:
    reviewed_job = client.request_review(
        "job_123",
        reviewer_email="reviewer@example.com",
        reviewer_team="qa-team",
    )
    print(reviewed_job.review.status)
    print(reviewed_job.reviewer_notification)

If review should be part of the job from the start, pass requires_review=True and reviewer details directly to submit_job(...).

API Keys

The client can also wrap the public API-key routes for scripted key rotation:

from provenarium_client import ProvenariumClient

with ProvenariumClient(api_key="pk_admin_...") as client:
    created = client.create_api_key(
        name="ingestion-bot",
        role="member",
    )
    print(created.token)

    for key in client.list_api_keys():
        print(key.name, key.role, key.is_active)

    client.delete_api_key(created.id)

Notes

  • this client wraps the public /api/v1/* surface only
  • API key management calls require an owner or admin team API key
  • suggest_schema(...) queues the file-backed suggestion and polls the public suggestion result endpoint before returning the saved schema
  • use the docs app and API reference for the canonical integration guide and exact wire payloads
  • the package is intentionally a lightweight convenience layer, not a heavy SDK

Tests

uv run pytest -q

Project details


Download files

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

Source Distribution

provenarium_client-0.1.3.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

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

provenarium_client-0.1.3-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file provenarium_client-0.1.3.tar.gz.

File metadata

  • Download URL: provenarium_client-0.1.3.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for provenarium_client-0.1.3.tar.gz
Algorithm Hash digest
SHA256 3c03d13240699fda47e32ba2f3eecb0835280fc849cee609c2823ecd2a89dcfd
MD5 cbd9769e80f88b9afc930db77f1abbe1
BLAKE2b-256 09fe01448487ea8f1a114501972582c4696cdb2f2dcc6035c94d11750388af9a

See more details on using hashes here.

Provenance

The following attestation bundles were made for provenarium_client-0.1.3.tar.gz:

Publisher: publish-client.yml on andrewruba/provenarium

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

File details

Details for the file provenarium_client-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for provenarium_client-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8e887ada5940625ccc01686f7ab696b8292e9e0cd263a1b63bf6890f80708143
MD5 d1114bd83c79f3d942cf67d51bcd12b9
BLAKE2b-256 5e04245762c0450839b055b9cea05dfe634a2e988020b721644971f3208ee1be

See more details on using hashes here.

Provenance

The following attestation bundles were made for provenarium_client-0.1.3-py3-none-any.whl:

Publisher: publish-client.yml on andrewruba/provenarium

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

Supported by

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