riv
Typed data pipelines for Python: a fast static checker (riv check) plus a
tiny, dependency-free runtime (riv_in, riv_out, Schema).
The model is TypeScript's: schemas are erased at runtime, checking is gradual,
and untyped riv is valid riv — forever. riv check plays the role of tsc
for the artifact-passing layer between your scripts.
Quickstart
pip install riv
Replace your pickle round-trips with the untyped form (works immediately,
warns under riv check):
from riv import riv_in, riv_out
riv_out(df, "users.pkl")
df = riv_in("users.pkl")
Then type it by attaching a schema:
# schemas.py
from riv import Schema
class UsersDf(Schema): ...
from schemas import UsersDf
UsersDf.riv_out(df, "users.pkl")
df = UsersDf.riv_in("users.pkl")
Declare a pipeline (steps are ordered; a step is a .py script or another
pipeline YAML):
# pipeline.yaml
name: full
steps:
- preprocess.py
- train.py
Check and run:
riv check # validate all pipelines
riv pipeline.yaml run # execute (refuses to start unless it checks)
The checker verifies the wiring between steps: that artifacts are produced before they are consumed, that producer and consumer agree on the schema, and that every IO call is (eventually) typed. A mismatch renders like this:
error[schema-mismatch]: `users.pkl` is consumed as `schemas.OrdersDf` but was produced as `schemas.UsersDf`
--> train.py:3:10
|
3 | orders = OrdersDf.riv_in("users.pkl")
| ^^^^^^^^ consumed as `schemas.OrdersDf`
|
::: preprocess.py:4:1
|
4 | UsersDf.riv_out(users, "users.pkl")
| ------- produced as `schemas.UsersDf`
Gradual typing
- Bare
riv_out(...)is a warning by default: a partially migrated codebase still passesriv check. strict: truein the pipeline YAML promotes unannotated IO to an error.Untyped.riv_out(blob, path)is the explicit escape hatch — legal even under strict.grep Untypedis your tech-debt list.
Try the example
cd examples/hello
riv check
riv pipeline.yaml run
Metadata
Release files for riv 0.1.0
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 |
|---|---|---|---|---|
| riv-0.1.0.tar.gz | 31.9 kB | With provenance | Details for riv-0.1.0.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| riv-0.1.0-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details for riv-0.1.0-py3-none-win_amd64.whl |
| riv-0.1.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | Python 3 | none | Linux glibc 2.17+ x86-64 | Details for riv-0.1.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
| riv-0.1.0-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details for riv-0.1.0-py3-none-macosx_11_0_arm64.whl |
| riv-0.1.0-py3-none-macosx_10_12_x86_64.whl | Python 3 | none | macOS 10.12+ x86-64 | Details for riv-0.1.0-py3-none-macosx_10_12_x86_64.whl |
Total release size: 5.2 MB
Release files / riv-0.1.0.tar.gz
| Download URL | riv-0.1.0.tar.gz |
|---|---|
| Size | 31.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4a63a56942d86c11884a72a9acaceeccaa85b39692928e70ca1c15bd2bca5e3e
|
|
BLAKE2b-256 checksum How to use checksums |
5481bbe93472176d3673d221399759ad9a68cf1b10af982eb79e9ecea855ff35
|
| 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 Aug 4, 2026.
Transparency logRelease files / riv-0.1.0-py3-none-win_amd64.whl
| Download URL | riv-0.1.0-py3-none-win_amd64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
659198d9537007bf0ff0be242c7576e66f11e641a3e091ebe51f4a15027a295a
|
|
BLAKE2b-256 checksum How to use checksums |
8d9082f4a5c0708142f51f641e3fee283f84286ffc9391e4692d25eff0f7e96a
|
| 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 Aug 4, 2026.
Transparency logRelease files / riv-0.1.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | riv-0.1.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | Linux glibc 2.17+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
5ce0dd3f00b0e617708ca621c17941c7a5621355e95aea49fecb9f0008bc1440
|
|
BLAKE2b-256 checksum How to use checksums |
a6d6897fb3c6bf9d2327d580bb466fb6c58f4c82ab9e727f56d7bc63f0ac5d93
|
| 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 Aug 4, 2026.
Transparency logRelease files / riv-0.1.0-py3-none-macosx_11_0_arm64.whl
| Download URL | riv-0.1.0-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
51911dd14abcd82fd67cbb5208baea4365c90dbf313b81a8224f3633a2a7a944
|
|
BLAKE2b-256 checksum How to use checksums |
774bd7296bae56129d25789cb805b7394ced0dd00d46a7e1425a8836693504fe
|
| 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 Aug 4, 2026.
Transparency logRelease files / riv-0.1.0-py3-none-macosx_10_12_x86_64.whl
| Download URL | riv-0.1.0-py3-none-macosx_10_12_x86_64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | Python 3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
8497451c0d4b72d6b138414adc287f3234e062f877bdf40f14bb92349c706fe3
|
|
BLAKE2b-256 checksum How to use checksums |
83f3f19436c2b3978a4002ba151a1879864a764a17cea8276faeefde442d991b
|
| 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 Aug 4, 2026.
Transparency logSecurity for riv 0.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
All 5 files in this release have been uploaded with provenance metadata.
Attestation for riv-0.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 Aug 4, 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.