Skip to main content

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:
    • dtype
    • nullable
    • allowed_values
    • min
    • max
  • 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.0"
  • __author__ = "XiaoZhouZhou"

Testing

python -m unittest -v tests/test_pipewise.py

Publish Checklist

  1. Update pipewise/__init__.py version.
  2. Update pyproject.toml version if needed.
  3. Run tests.
  4. Build the package:
python -m build
  1. Upload to PyPI with your preferred workflow, for example twine.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pipewise-1.0.0.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pipewise-1.0.0-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file pipewise-1.0.0.tar.gz.

File metadata

  • Download URL: pipewise-1.0.0.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pipewise-1.0.0.tar.gz
Algorithm Hash digest
SHA256 50ce4ba6ced8370dfba5746322f28bb157e28d8e2a9896f2cfbd0bc769448e84
MD5 b06267aed33e4894b8a3a6266a88a9b7
BLAKE2b-256 7c9e8369510692662c4329cfe6313d969b5a0baa863158d0bc4f26d8fee251b8

See more details on using hashes here.

Provenance

The following attestation bundles were made for pipewise-1.0.0.tar.gz:

Publisher: publish.yml on xiaozhozho/pipewise

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pipewise-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: pipewise-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pipewise-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1ce0c7126354bcdcf2ffb5c0f430e0fe2bb38c1099faccbe550a58544ed0a5ca
MD5 6cc2493f24fc43c22ff85f956b6f337f
BLAKE2b-256 ffcd0f51b435f4c87e8ef865618f9a04095d61b94556851fcd32a2454d7c1d3e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pipewise-1.0.0-py3-none-any.whl:

Publisher: publish.yml on xiaozhozho/pipewise

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page