Skip to main content

provium-pipeline

Provenance-addressed procedure graphs with local execution, PostgreSQL queues, filesystem/S3 artifact storage, reusable process workers, and completion callbacks.

python -m pip install -e packages/provium -e packages/provium-pipeline
provium pipeline run -f pipeline.yaml --input document=/data/document.pa --store ./artifacts

The base installation supports local execution and filesystem storage. Install optional backends as needed:

python -m pip install 'provium-pipeline[postgres]'
python -m pip install 'provium-pipeline[s3]'
python -m pip install 'provium-pipeline[postgres,s3]'

For an editable checkout, use -e 'packages/provium-pipeline[postgres,s3]'. The test extra includes both drivers for the full development test suite. Core Provium already provides its own optional s3 extra.

Inputs must already be Provium artifacts. Install the procedure catalogs referenced by the graph. All pipeline commands run through the core provium CLI.

kind: PipelineConfiguration
name: tokenize-documents
inputs:
  document: provium_text_pipeline_example.DocumentV1
nodes:
  tokenize:
    procedure: provium_text_pipeline_example.TokenizeV1
    tags: [text]
    inputs:
      source: $inputs.document
outputs:
  tokens: $nodes.tokenize.destination

The example procedure is provided by examples/provium-text-pipeline. Compute profiles are separate YAML documents. Default execution uses one child process; only one configured node is resident per context.

export PROVIUM_DATABASE_URL=postgresql://localhost/provium
provium pipeline register -f pipeline.yaml -f profiles.yaml
provium pipeline enqueue tokenize-documents --input document=/data/document.pa
provium pipeline run tokenize-documents --profile cluster --store s3://bucket/artifacts
provium pipeline status tokenize-documents --outputs

Repeated equivalent computations reuse verified results. PostgreSQL leases coordinate shared computation across pipelines. Force replaces results through an atomic accepted result reference while retaining immutable artifact versions for existing readers.

See the repository's usage examples for definitions, profiles, selectors, Python callbacks, time limits, and deployment.

Application settings

Pipeline CLI defaults can be set in ~/.config/provium/*.toml and overridden by the nearest project .provium/*.toml directory:

[pipeline]
database = "postgresql://localhost/provium"
store = "./.provium/artifacts"
scratch_directory = "/tmp/provium"

Use PROVIUM_CONFIG__PIPELINE__STORE=/data/artifacts for an environment override, or provium pipeline run -f pipeline.yaml --config pipeline.store=./artifacts for an invocation override. Dedicated flags such as --store take highest priority. Existing PROVIUM_DATABASE_URL and PROVIUM_PIPELINE_STORE variables remain supported. See Configuration for discovery rules, precedence, and typed overrides.

Package organization

The CLI registers a native core CommandGroup under pipeline:

  • cli/commands/: one class per command, each owning configure and execute.
  • cli/arguments.py: shared option declarations and local argument validation.
  • documents.py: YAML and local/remote document loading, imported only on use.
  • definitions.py: CLI-independent definition discovery.
  • preparation.py: graph and settings preparation with explicit inputs and injected persistence.

Commands dispatch through the core registry directly, without an action enum or central execution switch. Each command imports its dependencies when needed.

Persistence is organized separately:

  • persistence/interface.py: driver-independent queue and registry protocols.
  • persistence/backends/postgres.py: PostgreSQL implementation and migrations.
  • persistence/factory.py: explicit, lazy backend selection.

ExecutionContext accepts any implementation of QueueBackend. PersistenceBackend extends that contract with registry and input management. Use explicit implementation imports inside backend-specific code; public package exports load on demand. Importing models, runtime, persistence contracts, or CLI does not import PostgreSQL or S3 drivers. Help and invalid CLI arguments also avoid loading pipeline runtime and worker code. Graph and settings validation precede runtime loading; persisted-data validation requires the selected backend. validate and inspect use planning directly without creating a store or loading runtime and worker code.

Other packages can contribute actions to pipeline or any nested group by registering groups with the same names in their own command catalogs. Core merges those paths recursively while rejecting duplicate leaf commands. The standalone provium-pipeline script and python -m provium_pipeline runner are removed; use provium pipeline ... (or python -m provium pipeline ...).

from provium_pipeline.persistence import Backend, open_backend

persistence = open_backend(connection_url, backend=Backend.Postgres)

PostgreSQL is the default and currently the only persistence implementation. The existing --database option and PROVIUM_DATABASE_URL environment variable remain supported. Persistence APIs live under persistence; the legacy database.py facade and root persistence re-exports have been removed. Import concrete backends explicitly from provium_pipeline.persistence.backends.postgres.

Development

python -m pip install -e 'packages/provium[test]' -e 'packages/provium-pipeline[test]' \
  -e examples/provium-text-pipeline
python -m pytest packages/provium-pipeline/test
ruff check packages/provium-pipeline
ruff format --check packages/provium-pipeline
pyright --project packages/provium-pipeline/pyproject.toml

For PostgreSQL and S3 integration tests:

docker run -d --name provium-pipeline-postgres \
  -e POSTGRES_PASSWORD=provium -e POSTGRES_DB=provium \
  -p 127.0.0.1:55432:5432 postgres:17
docker run -d --name provium-pipeline-localstack \
  -e SERVICES=s3 -p 127.0.0.1:54566:4566 localstack/localstack:4

export PROVIUM_TEST_DATABASE=postgresql://postgres:provium@localhost:55432/provium
export PROVIUM_TEST_S3=1 AWS_ENDPOINT_URL_S3=http://localhost:54566
export AWS_ACCESS_KEY_ID=test AWS_SECRET_ACCESS_KEY=test AWS_DEFAULT_REGION=us-east-1
python -m pytest packages/provium-pipeline/test

Integration tests create unique records and buckets. Use a disposable test database. Slurm/AWS Batch deployment uses the same CLI with externally allocated resources; those scheduler services are not required for local integration tests.

Named queues

Use --queue NAME (short form -q) with enqueue, run, status, queue, and retry to isolate queued work within a registered pipeline. Equivalent computations can still share cached results across queues.

provium pipeline enqueue tokenize-documents -q priority --input document=/data/document.pa
provium pipeline run tokenize-documents -q priority
provium pipeline queue tokenize-documents -q priority

The default queue is default. Configure pipeline.queue.default_group to choose another default, or set pipeline.queue.default_enabled = false to require explicit selection. Existing PostgreSQL rows migrate to default; stop older workers before upgrading. See Named queues for details.

Metadata

Release files for provium-pipeline 2.1.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 provium-pipeline 2.1.0
File Size Uploaded Provenance Actions
provium_pipeline-2.1.0.tar.gz 61.0 kB With provenance Details for provium_pipeline-2.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for provium-pipeline 2.1.0
File Interpreter ABI Platform Actions
provium_pipeline-2.1.0-py3-none-any.whl Python 3 none any Details for provium_pipeline-2.1.0-py3-none-any.whl

Total release size: 104.8 kB

Release files / provium_pipeline-2.1.0.tar.gz

Download URL provium_pipeline-2.1.0.tar.gz
Size 61.0 kB
Tags Source
SHA-256 checksum
How to use checksums
1a98b90e5b16c16445451ea546100cf782f44df512fe46e3700230683b603b57
BLAKE2b-256 checksum
How to use checksums
ebf83c85b4b0ffdcb9c3ebd2b8e553d9682c573a4b0d618a9e8eda15e5acd101
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

Release files / provium_pipeline-2.1.0-py3-none-any.whl

Download URL provium_pipeline-2.1.0-py3-none-any.whl
Size 43.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c51fdb93738d8a65223efb18c6015e3dbcde00dec407672776890e4ace7ddedc
BLAKE2b-256 checksum
How to use checksums
cbb8b7105b349782a2d97dbd3d8a5fb2f6b7b5602996ff58e54ba0e88b67177d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

Security for provium-pipeline 2.1.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for provium_pipeline-2.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

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.

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