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.1.0.tar.gz (21.6 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.1.0-py3-none-any.whl (14.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pipewise-1.1.0.tar.gz
Algorithm Hash digest
SHA256 326cea42fb5ab583dce68ec000a01b7ece6a9779065cc96530fcc71b377a9b55
MD5 42583d7e9022951d33c5ae29b198cb1d
BLAKE2b-256 d88fddc1b3f883ebc48f2d3262b2efcdd13404f5d1217de2a08f71fad0599bf8

See more details on using hashes here.

Provenance

The following attestation bundles were made for pipewise-1.1.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.1.0-py3-none-any.whl.

File metadata

  • Download URL: pipewise-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0faeef5035424d45f8016bebb42b2bc6f298877840fe4c52e2064f37abf9d01a
MD5 ef77cce12c5250bf827a1fade062b3ca
BLAKE2b-256 27f56359ef84128ceeb0779729b2fc44da7b47123967b680fe5092688541aae2

See more details on using hashes here.

Provenance

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