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 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
  • 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.2.tar.gz (12.0 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.2-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: provenarium_client-0.1.2.tar.gz
  • Upload date:
  • Size: 12.0 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.2.tar.gz
Algorithm Hash digest
SHA256 9eaa6551bc78a3dc1ff2c99c8b0bee9d3261cef71e902ff0983615e8792d74fe
MD5 96289cce97c8dc5709989f4d58a87dd8
BLAKE2b-256 2ed2c4198627478d01096dc4e830e6544d7bb3bd56e48953a97e13455a93c91f

See more details on using hashes here.

Provenance

The following attestation bundles were made for provenarium_client-0.1.2.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.2-py3-none-any.whl.

File metadata

File hashes

Hashes for provenarium_client-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2f8ab5d3b23bfd4115d49d22e44635aeb388ab8fc78cc15b616821a782f8b798
MD5 19c65ab22e1205108f1e94152166165c
BLAKE2b-256 4679cf1ff11b0e2816b89a0a44f9370d64a9db5506e9864aa5a26ab007b97884

See more details on using hashes here.

Provenance

The following attestation bundles were made for provenarium_client-0.1.2-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