A lightweight pandas DataFrame pipeline with schema validation and rollback support.
Project description
Pipewise
Pipewise is a lightweight pandas.DataFrame pipeline library for teams that
want reusable data-processing steps without adopting a heavyweight workflow
framework.
It helps you:
- register step functions with decorators
- map function arguments to DataFrame columns automatically
- write results back to one or more columns
- validate input and output schema rules
- fall back from vectorized mode to row-wise mode when needed
- roll back all changes if any task fails
Installation
After publishing to PyPI:
pip install pipewise
For local development:
pip install -r requirements.txt
pip install -e .
Quick Start
import pandas as pd
from pipewise import Pipewise
df = pd.DataFrame({"a": [1, 2, 3], "b": [10, 20, 30]})
pipewise = Pipewise(df)
@pipewise.register(outputs=["sum", "product"])
def calc(a, b):
return a + b, a * b
result = pipewise.run()
print(result)
Core Features
- Sequential pipeline registration with
@pipewise.register(...) - Multiple output modes:
- no output
- single-column output
- multi-column output
- typed output mapping
- dynamic dict output
- Grouped execution with
groupby - Schema checks:
dtypenullableallowed_valuesminmax
- Automatic rollback when execution fails
- Custom exception hierarchy for easier debugging
Package Structure
pipewise/
__init__.py
core.py
errors.py
tests/
test_pipewise.py
README.md
requirements.txt
pyproject.toml
Public Metadata
from pipewise import __author__, __version__
__version__ = "1.0.1"__author__ = "XiaoZhouZhou"
Testing
python -m unittest -v tests/test_pipewise.py
Publish Checklist
- Update
pipewise/__init__.pyversion. - Update
pyproject.tomlversion if needed. - Run tests.
- Build the package:
python -m build
- Upload to PyPI with your preferred workflow, for example
twine.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pipewise-1.0.1.tar.gz.
File metadata
- Download URL: pipewise-1.0.1.tar.gz
- Upload date:
- Size: 12.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
29965bb10086dc3e8571fd4442e5685505ebc70a45435fefaa816d8ebc81b6c1
|
|
| MD5 |
da005548debc33e954d277ccdb3dc6f6
|
|
| BLAKE2b-256 |
1b0f3b0941a0552119182dc6e63b6c012a868ddd64c5ef745de89631c2d9ef0a
|
Provenance
The following attestation bundles were made for pipewise-1.0.1.tar.gz:
Publisher:
publish.yml on xiaozhozho/pipewise
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pipewise-1.0.1.tar.gz -
Subject digest:
29965bb10086dc3e8571fd4442e5685505ebc70a45435fefaa816d8ebc81b6c1 - Sigstore transparency entry: 1552470315
- Sigstore integration time:
-
Permalink:
xiaozhozho/pipewise@a42a563f1cce74a2e66431148494ee5188253d9f -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/xiaozhozho
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a42a563f1cce74a2e66431148494ee5188253d9f -
Trigger Event:
push
-
Statement type:
File details
Details for the file pipewise-1.0.1-py3-none-any.whl.
File metadata
- Download URL: pipewise-1.0.1-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89808985ded5e4b55ccf3a500348acb2cfbbdcb407cd8e4770e4c2830fc02861
|
|
| MD5 |
4e965ba3b1e656c2b1b68c99d0c920c1
|
|
| BLAKE2b-256 |
ee36a2a2f21c9bc35469d3dab4fb17019ad10b04e9cc4a75f52f5ca92bdbad10
|
Provenance
The following attestation bundles were made for pipewise-1.0.1-py3-none-any.whl:
Publisher:
publish.yml on xiaozhozho/pipewise
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pipewise-1.0.1-py3-none-any.whl -
Subject digest:
89808985ded5e4b55ccf3a500348acb2cfbbdcb407cd8e4770e4c2830fc02861 - Sigstore transparency entry: 1552470328
- Sigstore integration time:
-
Permalink:
xiaozhozho/pipewise@a42a563f1cce74a2e66431148494ee5188253d9f -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/xiaozhozho
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a42a563f1cce74a2e66431148494ee5188253d9f -
Trigger Event:
push
-
Statement type: