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). Callfitbeforetransform. - Covers the blackout and jitter simulators. Model scoring (
evaluate,compare) and flipper live in thepasteur-clicommand-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.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pypasteur-0.4.1.tar.gz | 66.0 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| pypasteur-0.4.1-cp312-abi3-win_amd64.whl | CPython 3.12 | abi3 | Windows x86-64 | Details |
| pypasteur-0.4.1-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.1-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.12 | abi3 | Linux glibc 2.17+ ARM64 | Details |
| pypasteur-0.4.1-cp312-abi3-macosx_11_0_arm64.whl | CPython 3.12 | abi3 | macOS 11.0+ ARM64 | Details |
| pypasteur-0.4.1-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.1.tar.gz
| Download URL | pypasteur-0.4.1.tar.gz |
|---|---|
| Size | 66.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
92e5202a15cdc2fd92fdeab0fd008d9637c332ee11231f07fe72a583cab788e0
|
|
BLAKE2b-256 checksum How to use checksums |
25c88d519c2459bef4f87abc3fbeb55c0c896ed8833df3daa7fe0412fe62881d
|
| 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 logRelease files / pypasteur-0.4.1-cp312-abi3-win_amd64.whl
| Download URL | pypasteur-0.4.1-cp312-abi3-win_amd64.whl |
|---|---|
| Size | 24.0 MB |
| Tags | CPython 3.12 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
131d00ee37b21d52e5e22838e8a45c54089af6d872a374d90eda86630cb1f756
|
|
BLAKE2b-256 checksum How to use checksums |
6702d5fa87042b2d67c5719a8dff95aac1e5e1afacd355862228eef7d8f46e23
|
| 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 logRelease files / pypasteur-0.4.1-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pypasteur-0.4.1-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 |
feb3d0a858798f9efe98ed2541c87a5fda934d5251352c6081ee3b4c509407a3
|
|
BLAKE2b-256 checksum How to use checksums |
b83e4356965f1c8286873849eebde8c207fa11daf50dddffa6c04715ff7899fc
|
| 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 logRelease files / pypasteur-0.4.1-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | pypasteur-0.4.1-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 |
9c59a6244a41af7c4a673bc2ec830bb94caa0c27ec700c32307d254de13f2646
|
|
BLAKE2b-256 checksum How to use checksums |
4a2b57269c3361c2fca46946fd41b6acd9edc504cbe487b59ac073bd6ec068a3
|
| 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 logRelease files / pypasteur-0.4.1-cp312-abi3-macosx_11_0_arm64.whl
| Download URL | pypasteur-0.4.1-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 |
cae8218d022cdc8b36e0d8e68b7ab7091a9d7f8d617a2cb7e65a556d2588b3af
|
|
BLAKE2b-256 checksum How to use checksums |
9774e5b96212ce0980da2c4f2582510714675e34248dbac2a2f15a5aa1816dc5
|
| 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 logRelease files / pypasteur-0.4.1-cp312-abi3-macosx_10_12_x86_64.whl
| Download URL | pypasteur-0.4.1-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 |
7e6773fbb24cd5b65c1ec8fe132381cd31827379ba5c564cba176a9031663e72
|
|
BLAKE2b-256 checksum How to use checksums |
070c7a0cfa89d66a0fcd4e6c250843df108add1b7223531a703083b23c531f2d
|
| 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