This release is a pre-release and may not be stable for production use.
Gaspatchio (Python)
The Python package for Gaspatchio — a high-performance actuarial modeling framework. You write models in Python that read like spreadsheet formulas, and a Rust + Polars engine runs them over millions of model points.
📖 Documentation, tutorials, and full API + CLI reference → gaspatchio.dev
Install
pip install gaspatchio # or: uv pip install gaspatchio
pip install "gaspatchio[jax]" # adds the JAX engine (gaspatchio-jax)
pip install "gaspatchio[viewer]" # adds the viewer (gaspatchio-viewer), for --html
Then import gaspatchio. Each extra pins its distribution exactly, and neither is needed to
build or run a model. For a source/dev build, see Building from source.
Quick start
from gaspatchio import ActuarialFrame
from gaspatchio.assumptions import Table
# 1. Load assumption tables (registered + optimized by the Rust engine)
mortality = Table(
name="mortality",
source="data/mortality.parquet",
dimensions={"age": "age", "gender": "sex"},
value="rate",
)
# 2. Define the model — the formula IS the code
def projection(af: ActuarialFrame) -> ActuarialFrame:
af.attained_age = af.dob.excel.yearfrac(af.val_date) + af.t # Excel-compatible date maths
af.qx = mortality.lookup(age=af.attained_age, gender=af.gender) # vectorized lookup
af.pols_if = af.pols_start * (1 - af.qx - af.lapse_rate) # vectorized projection
return af
# 3. Run (millions of model points supported)
af = ActuarialFrame(data="model_points.parquet")
result = projection(af).collect()
New here? The tutorials build from hello-world to a lifelib-reconciled model and on to scenarios.
CLI: gspio
Run models from the command line:
gspio run-model model.py model-points.parquet # run all policies
gspio run-single-policy model.py model-points.parquet 12345 # debug one policy (transposed output)
gspio run-model model.py data.parquet --mode optimize # skip tracing and profiling
gspio --install-completion # shell tab-completion
--policy-id-columnsets the policy-identifier column (auto-detected if omitted).--mode {debug,optimize}plus display flags (--rows/-r,--first-n/-f,--last-n/-l,--start-at/-s) control execution and terminal output.
Use --results for calculated values across run-model, run-single-policy,
calc-graph and run-artifact. For a review, one export can write the values,
their calculation record and an HTML viewer:
gspio calc-graph model.py data.parquet \
--results results.parquet --artifact audit.json --html review.html
--artifact names the JSON calculation graph; --html needs the viewer extra,
pip install "gaspatchio[viewer]".
The graph names its results file by path and content hash. Existing flags keep
their meanings: --output-file still names results on the model/export commands;
--output and -o still name the artifact on calc-graph, and results on
run-artifact. -o also remains a results alias on the two model commands.
Diagnostic mode and execution engine are separate choices. --mode debug traces
and profiles the Python model; --mode optimize skips that work. Both model
commands use Polars. run-artifact --engine jax selects the optional JAX engine,
which pip install "gaspatchio[jax]" installs, over an artifact exported with
calc-graph --profile executable; JAX configuration selects its device. Choosing
JAX does not itself select a GPU.
Full CLI reference, with every flag and the single-policy result transposition → gaspatchio.dev.
Building from source
The Rust extension is built with maturin. uv sync builds in debug
mode (fast compiles); use --release for benchmarking/production:
uv sync # debug build, into the source tree
uvx maturin develop --release --uv # optimized build
RUSTFLAGS="-C target-cpu=native" uvx maturin develop --release --uv # + native SIMD (AVX2/512)
develop, not build: the venv imports gaspatchio from this directory via a .pth, so the
extension has to be installed into the source tree — maturin build writes a wheel to
target/wheels and leaves the imported .so exactly where it was.
target-cpu=native binaries only run on CPUs with the same or newer instruction sets — use them
for local benchmarking, not for distributable packages or CI builds.
Testing
.venv/bin/python -m pytest # tests + docstring-example validation
.venv/bin/python -m mypy.stubtest gaspatchio --allowlist stubtest-allowlist.txt --mypy-config-file mypy-stubtest.ini
Public-API docstrings carry examples validated against their output. The docstring/style tooling
and contributor coding standards live in AGENTS.md.
Learn more
- 📖 Documentation — guides, tutorials, full API + CLI reference
- 🦀 Rust engine — the core that powers this package
- 🏠 Project overview
Metadata
Release files for gaspatchio 1.0.0rc1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gaspatchio-1.0.0rc1.tar.gz | 6.4 MB | With provenance | Details for gaspatchio-1.0.0rc1.tar.gz |
Built distributions (wheels)
Total release size: 154.2 MB
Release files / gaspatchio-1.0.0rc1.tar.gz
| Download URL | gaspatchio-1.0.0rc1.tar.gz |
|---|---|
| Size | 6.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9b18542a22078283d0335cf32b01115e26cd4f3b5b70e34861e5277ee176631d
|
|
BLAKE2b-256 checksum How to use checksums |
0dace10adce18ab465825b3c906826f75482741ffcbc2d0817d85026dd1e6a17
|
| 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 Nov 2, 2026.
Transparency logRelease files / gaspatchio-1.0.0rc1-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | gaspatchio-1.0.0rc1-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 12.7 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
468e6ae42c4c1f96e185ec644c7768e7760ccf888001ae1430ceabb4a98be336
|
|
BLAKE2b-256 checksum How to use checksums |
9a9b41f0409d537f0fd2850de028d9eb047caf625dbad23bc913443db5c2ae8e
|
| 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 Nov 2, 2026.
Transparency logRelease files / gaspatchio-1.0.0rc1-cp314-cp314-win_amd64.whl
| Download URL | gaspatchio-1.0.0rc1-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 11.1 MB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
9e9874540302262c0f2fd6937aad28fca0b20fda9f75cb6fd1d66c5fa6d7a806
|
|
BLAKE2b-256 checksum How to use checksums |
db0c7c4cb7a29be5b51a3000081fd06486ba7e28f7bdcc61cb50b3590974fb55
|
| 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 Nov 2, 2026.
Transparency logRelease files / gaspatchio-1.0.0rc1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | gaspatchio-1.0.0rc1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 12.7 MB |
| Tags | CPython 3.14 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
d888121f5543c4da1e42bf0ddda599a0f1e3b916d735cc368379d0f9c57beb4f
|
|
BLAKE2b-256 checksum How to use checksums |
268d5073a738cff86fdb0565d7258ba83d44781584c57b4f382e67c4b801c45a
|
| 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 Nov 2, 2026.
Transparency logRelease files / gaspatchio-1.0.0rc1-cp314-cp314-macosx_11_0_arm64.whl
| Download URL | gaspatchio-1.0.0rc1-cp314-cp314-macosx_11_0_arm64.whl |
|---|---|
| Size | 10.4 MB |
| Tags | CPython 3.14 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
a53de453063a1d9449e1e820affc55cb19ed0d23ace494b9e5593f2806150a5a
|
|
BLAKE2b-256 checksum How to use checksums |
2701eb30ba1a4c3c4a3cda1a4f9a2de2c46e28e8e075c2f933099412e8527820
|
| 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 Nov 2, 2026.
Transparency logRelease files / gaspatchio-1.0.0rc1-cp314-cp314-macosx_10_12_x86_64.whl
| Download URL | gaspatchio-1.0.0rc1-cp314-cp314-macosx_10_12_x86_64.whl |
|---|---|
| Size | 10.8 MB |
| Tags | CPython 3.14 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
f17ce16b499c034f6293e29259363f47794cd3a7e582ac7b3df8183e9fb08b4d
|
|
BLAKE2b-256 checksum How to use checksums |
c921a0ae7572ddc06acd71fe18102066e6eb670db1dd6d82e51366128c9db87f
|
| 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 Nov 2, 2026.
Transparency logRelease files / gaspatchio-1.0.0rc1-cp313-cp313-win_amd64.whl
| Download URL | gaspatchio-1.0.0rc1-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 11.1 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
612e1eb8491b5578a0f6e5afee0ea0ade45c83331cc746c3bf5e37ed081340b4
|
|
BLAKE2b-256 checksum How to use checksums |
9f2415194d4560916dd1135e1e15a00090baea2e5e9808e391a14d402e19af89
|
| 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 Nov 2, 2026.
Transparency logRelease files / gaspatchio-1.0.0rc1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | gaspatchio-1.0.0rc1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 12.7 MB |
| Tags | CPython 3.13 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
2863d33829b7806e787a5298c8cdf8f56a15e82b5cb042efb155702bf8c7f6c0
|
|
BLAKE2b-256 checksum How to use checksums |
7042e15bc6be8556f89a66f8b596cc6a5c0facad4b6210fe9d69c91e99ec10e7
|
| 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 Nov 2, 2026.
Transparency logRelease files / gaspatchio-1.0.0rc1-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | gaspatchio-1.0.0rc1-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 10.4 MB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
6aa78f5c92987c5bbf0c76be5f9c95ec58c86739e67ae14459f0928cc3e5de15
|
|
BLAKE2b-256 checksum How to use checksums |
224c7072e9947971c05f796b7f78b98d83332c917bb3aea2a2e1384dac4260c2
|
| 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 Nov 2, 2026.
Transparency logRelease files / gaspatchio-1.0.0rc1-cp313-cp313-macosx_10_12_x86_64.whl
| Download URL | gaspatchio-1.0.0rc1-cp313-cp313-macosx_10_12_x86_64.whl |
|---|---|
| Size | 10.8 MB |
| Tags | CPython 3.13 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
9f1f0713c48cd041755bbd19ad503c3ab4fefae3b04394bf2ced1786ea75fae9
|
|
BLAKE2b-256 checksum How to use checksums |
f89ef69aa467b36dd30344cca793eb9e1d58207fb886526b3a28066ae11ff838
|
| 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 Nov 2, 2026.
Transparency logRelease files / gaspatchio-1.0.0rc1-cp312-cp312-win_amd64.whl
| Download URL | gaspatchio-1.0.0rc1-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 11.1 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
cec0beaa0fd8925bfd0815e746f9dfd5919838d98d811ee35488ec6aacd7a0f3
|
|
BLAKE2b-256 checksum How to use checksums |
895ea5789d9363d497f4fb6737194493aadbd6739c51cca4cf461fc23b72f254
|
| 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 Nov 2, 2026.
Transparency logRelease files / gaspatchio-1.0.0rc1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | gaspatchio-1.0.0rc1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 12.7 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
fdb38e92c284335013810232a82e10015fe14c9f2e78f889d3641844e677aa25
|
|
BLAKE2b-256 checksum How to use checksums |
39bc3e3df9cc85ccfa96ba85ea9926503a8dc7e5a3c9bf91b96e229a19279256
|
| 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 Nov 2, 2026.
Transparency logRelease files / gaspatchio-1.0.0rc1-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | gaspatchio-1.0.0rc1-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 10.4 MB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
9b79c25b3e1fbc39dc17ab3ff083d17e6cf14e72b820d3f9b6d040ebd6bdcdd3
|
|
BLAKE2b-256 checksum How to use checksums |
ca66ce58c0db379987c2995214d4e4cdf2ecc4136812340b109c621a061d580a
|
| 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 Nov 2, 2026.
Transparency logRelease files / gaspatchio-1.0.0rc1-cp312-cp312-macosx_10_12_x86_64.whl
| Download URL | gaspatchio-1.0.0rc1-cp312-cp312-macosx_10_12_x86_64.whl |
|---|---|
| Size | 10.8 MB |
| Tags | CPython 3.12 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
ea9e4456bb9071caad00de2a2a1632a2866b357920f7c932a01c50a61cf13134
|
|
BLAKE2b-256 checksum How to use checksums |
61f47c0d728f236ec047e44a4fd00aca0e54b5f97a356503d4e6a8286b679551
|
| 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 Nov 2, 2026.
Transparency logSecurity for gaspatchio 1.0.0rc1
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
All 14 files in this release have been uploaded with provenance metadata.
Attestation for gaspatchio-1.0.0rc1.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 2, 2026.
Transparency logA 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.