Skip to main content

pypasteur

Python bindings for pasteur-core: data simulators for stress-testing clinical AI models, built on polars.

pip install pypasteur
import polars as pl
import pypasteur

df = pl.read_parquet("clean.parquet")

# Null out `tsh` (and its companion columns) for a fraction of rows.
blackout = pypasteur.BlackoutSimulator("tsh", rate=0.1, random_state=42, companions=["tsh_measured"])
blackout.fit(df)
shifted = blackout.transform(df)

# Add scaled noise to `tsh`.
jitter = pypasteur.JitterSimulator("tsh", scale=1.0, random_state=42)
jitter.fit(df)
noisy = jitter.transform(df)

BlackoutSimulator also accepts window_frac, patient_id_col, and time_col for longitudinal data. JitterSimulator's scale is in units of the feature's standard deviation.

  • Runs entirely in-process on your machine: no network calls, no telemetry.
  • Takes and returns polars DataFrames. From pandas, use pl.from_pandas(df). Call fit before transform.
  • Covers the blackout and jitter simulators. Model scoring (evaluate, compare) and flipper live in the pasteur-cli command-line tool.
  • Output frames keep every input column, including patient identifiers. Handle them like the input.

Requires CPython ≥ 3.12. Wheels are abi3. This package is pypasteur; the pasteur package on PyPI is an unrelated project.

Documentation, including security and data handling: docs.krv.ai/pasteur.

Development

pip install maturin polars
maturin develop            # from this directory
python tests/smoke.py

Metadata

Release files for pypasteur 0.4.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 pypasteur 0.4.0
File Size Uploaded
pypasteur-0.4.0.tar.gz 65.6 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for pypasteur 0.4.0
File
pypasteur-0.4.0-cp312-abi3-win_amd64.whl CPython 3.12 abi3 Windows x86-64 Details
pypasteur-0.4.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 abi3 Linux glibc 2.17+ x86-64 Details
pypasteur-0.4.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.12 abi3 Linux glibc 2.17+ ARM64 Details
pypasteur-0.4.0-cp312-abi3-macosx_11_0_arm64.whl CPython 3.12 abi3 macOS 11.0+ ARM64 Details
pypasteur-0.4.0-cp312-abi3-macosx_10_12_x86_64.whl CPython 3.12 abi3 macOS 10.12+ x86-64 Details

Total release size: 125.5 MB

Release files / pypasteur-0.4.0.tar.gz

Download URL pypasteur-0.4.0.tar.gz
Size 65.6 kB
Tags Source
SHA-256 checksum
How to use checksums
aca7f322f8d6c13e73dde5439eac023bdcdaaff81bf2a0f578c938b09fff1c8d
BLAKE2b-256 checksum
How to use checksums
c28b4159332b40f094ce8ff46dd2bcac2a2559f511e79eda64c34bd0259e53f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 9, 2026.

Transparency log

Release files / pypasteur-0.4.0-cp312-abi3-win_amd64.whl

Download URL pypasteur-0.4.0-cp312-abi3-win_amd64.whl
Size 24.0 MB
Tags CPython 3.12 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
7fe9ad561e485e046c6b1ef8685b05340450b8d771ca4889a0d6a87b1f2b9b9e
BLAKE2b-256 checksum
How to use checksums
018e68d923f8ab73bc0133a6cf8e28a4b2839b79e53748bb2fec528e772c3f6f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 9, 2026.

Transparency log

Release files / pypasteur-0.4.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pypasteur-0.4.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 25.4 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
4978ed3e5a80188b75c431a8ac77f3491dfaa75b796873d7a8b3d09d9f1e8662
BLAKE2b-256 checksum
How to use checksums
2b29568475d1a516345aa3a8e85b77ffbce0598a65bb75066e164be2e8d916ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 9, 2026.

Transparency log

Release files / pypasteur-0.4.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL pypasteur-0.4.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 28.4 MB
Tags CPython 3.12 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
264e166475798571c86558f6d629d4f75424e150dc99d0b0d1a5042f015efb9d
BLAKE2b-256 checksum
How to use checksums
cdeadc66d1f1b248a28b73be6a5573e173bebf442a16c7045558e1eadb9e3c16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 9, 2026.

Transparency log

Release files / pypasteur-0.4.0-cp312-abi3-macosx_11_0_arm64.whl

Download URL pypasteur-0.4.0-cp312-abi3-macosx_11_0_arm64.whl
Size 23.2 MB
Tags CPython 3.12 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
1b85e0be0ab34d0221be16f39042e54a22e1cf176eb50074e2ff08f2d91c680b
BLAKE2b-256 checksum
How to use checksums
27b1bde41bdb914390c28100b328ccd57813dd76e8a0e501f6876131f2e88858
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 9, 2026.

Transparency log

Release files / pypasteur-0.4.0-cp312-abi3-macosx_10_12_x86_64.whl

Download URL pypasteur-0.4.0-cp312-abi3-macosx_10_12_x86_64.whl
Size 24.4 MB
Tags CPython 3.12 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
542a87fe4a39d7c502c7a23f10350f2ed96f1d3087325aa9ba072f1f0ebc2c86
BLAKE2b-256 checksum
How to use checksums
9ed4c223881c9c7acc4aab0090b2054ce4ccaae2e8336262e29219425400ee43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 9, 2026.

Transparency log

Release history Release notifications | RSS feed

0.4.1

6 release files

This release

0.4.0 This release

6 release files

0.3.0

6 release files

0.0.0

2 release files

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