Skip to main content

Run pytests pypi-badge

pipestat

Pipestat is a Python package for managing pipeline results. It provides a standard API for reporting, storing, and retrieving outputs from any computational pipeline. Results are validated against a JSON Schema and stored in either a YAML file or a PostgreSQL database. A pipeline author defines outputs in a schema, then uses pipestat to report results as the pipeline runs. Downstream tools retrieve those results through the same API.

See Pipestat documentation for complete details.

Quick Start

import pipestat

psm = pipestat.PipestatManager(
    schema_path="output_schema.yaml",
    results_file_path="results.yaml",
    record_identifier="sample1",
)
psm.report(values={"accuracy": 0.95, "processing_time": 12.3})
psm.report(values={"output_file": {"path": "results/output.csv", "title": "Output CSV"}})

Schema

Pipestat requires a schema that defines the results your pipeline reports. Here is a minimal example:

pipeline_name: my_pipeline
samples:
  accuracy:
    type: number
    description: "Model accuracy score"
  processing_time:
    type: number
    description: "Processing time in seconds"
  output_file:
    type: object
    object_type: file
    properties:
      path: {type: string}
      title: {type: string}
    required: ["path", "title"]

Every result needs type and description. See sample_output_schema_generic.yaml in this repo for a fuller example with both sample and project result types.

Generating a schema from existing results

If you already have a pipestat results file, you can auto-generate a schema:

pipestat infer-schema -f results.yaml -o schema.yaml

This inspects your results and produces a schema with the correct types. See pipestat infer-schema --help for options.

Developer tests

Set up an environment with uv:

uv venv
uv pip install -e ".[test,dbbackend,pephub]"

Unit tests need no services. Run them with plain pytest:

.venv/bin/python -m pytest tests

Database tests live in tests/integration/ and need PostgreSQL. They are skipped unless RUN_INTEGRATION_TESTS=true. The easiest way to run everything (unit and integration) is the runner script, which starts a throwaway PostgreSQL in Docker and removes it afterward:

tests/scripts/test-integration.sh              # installs with uv, then runs all tests
tests/scripts/test-integration.sh --no-install # skip the install step
tests/scripts/test-integration.sh -k select    # extra args go to pytest

If RUN_INTEGRATION_TESTS=true is set but the database can't be reached, the run stops with an error instead of skipping tests. CI runs the same script.

PEPhub backend tests use an in-memory fake PEPhub client, so they need no network or login. pytest tests/test_pephub.py --pephub-live runs them against the live pephub.databio.org service instead; that needs phc login and writes to a real PEP.

Metadata

Release files for pipestat 0.14.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 pipestat 0.14.0
File Size Uploaded Provenance Actions
pipestat-0.14.0.tar.gz 183.4 kB With provenance Details for pipestat-0.14.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pipestat 0.14.0
File Interpreter ABI Platform Actions
pipestat-0.14.0-py3-none-any.whl Python 3 none any Details for pipestat-0.14.0-py3-none-any.whl

Total release size: 292.3 kB

Release files / pipestat-0.14.0.tar.gz

Download URL pipestat-0.14.0.tar.gz
Size 183.4 kB
Tags Source
SHA-256 checksum
How to use checksums
1c329cd697424a5a4ee8bbd5642ab08c6f5ce52bc5e6554efecdfd3d75ac6160
BLAKE2b-256 checksum
How to use checksums
b8b6d6f6af42c467bc1f9821aea769a2ceb40fb7ceaf1b956011d785448a3bc1
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 Nov 17, 2026.

Transparency log

Release files / pipestat-0.14.0-py3-none-any.whl

Download URL pipestat-0.14.0-py3-none-any.whl
Size 108.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
45cd8a8e7c192c8dadc980f8aef7555bae34478bc9ea2913e15f38e9fdaf8233
BLAKE2b-256 checksum
How to use checksums
6266909b5410a2983042bceb00b6e87b6a7a67b150a148dd121dbbff54fb7d5e
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 Nov 17, 2026.

Transparency log

Security for pipestat 0.14.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 pipestat-0.14.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 Nov 17, 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.

Release history Release notifications | RSS feed

This release

0.14.0 This release

2 release files Full 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