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.1"
  • __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.1.tar.gz (12.5 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.1-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

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

Hashes for pipewise-1.0.1.tar.gz
Algorithm Hash digest
SHA256 29965bb10086dc3e8571fd4442e5685505ebc70a45435fefaa816d8ebc81b6c1
MD5 da005548debc33e954d277ccdb3dc6f6
BLAKE2b-256 1b0f3b0941a0552119182dc6e63b6c012a868ddd64c5ef745de89631c2d9ef0a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pipewise-1.0.1.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.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

Hashes for pipewise-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 89808985ded5e4b55ccf3a500348acb2cfbbdcb407cd8e4770e4c2830fc02861
MD5 4e965ba3b1e656c2b1b68c99d0c920c1
BLAKE2b-256 ee36a2a2f21c9bc35469d3dab4fb17019ad10b04e9cc4a75f52f5ca92bdbad10

See more details on using hashes here.

Provenance

The following attestation bundles were made for pipewise-1.0.1-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