Skip to main content

ZooPipe is a data processing framework that allows you to process data in a declarative way.

Project description

ZooPipe

ZooPipe is a lean, ultra-high-performance data processing engine for Python. It leverages a 100% Rust core to handle I/O and orchestration, while keeping the flexibility of Python for schema validation (via Pydantic) and custom data enrichment (via Hooks).


✨ Key Features

  • 🚀 100% Native Rust Engine: The core execution loop, including CSV and JSON parsing/writing, is implemented in Rust for maximum throughput.
  • 🔍 Declarative Validation: Use Pydantic models to define and validate your data structures naturally.
  • 🪝 Python Hooks: Transform and enrich data at any stage using standard Python functions or classes.
  • 🚨 Automated Error Routing: Native support for routing failed records to a dedicated error output.
  • 📊 Multiple Format Support: Optimized readers/writers for CSV, JSONL, and SQL databases (via SQLx with batch inserts).
  • 🔧 Pluggable Executors: Choose between single-threaded or multi-threaded execution strategies.

🚀 Quick Start

Installation

uv build
uv run maturin develop --release

Simple Example

from pydantic import BaseModel, ConfigDict
from zoopipe import CSVInputAdapter, CSVOutputAdapter, Pipe


class UserSchema(BaseModel):
    model_config = ConfigDict(extra="ignore")
    user_id: str
    username: str
    email: str


pipe = Pipe(
    input_adapter=CSVInputAdapter("users.csv"),
    output_adapter=CSVOutputAdapter("processed_users.csv"),
    error_output_adapter=CSVOutputAdapter("errors.csv"),
    schema_model=UserSchema,
)

pipe.start()
pipe.wait()

print(f"Finished! Processed {pipe.report.total_processed} items.")

📚 Documentation

Core Concepts

Hooks

Hooks are Python classes that allow you to intercept, transform, and enrich data at different stages of the pipeline.

📘 Read the full Hooks Guide to learn about lifecycle methods (setup, execute, teardown), state management, and advanced patterns like cursor pagination.

Quick Example

from zoopipe import BaseHook

class MyHook(BaseHook):
    def execute(self, entries, store):
        for entry in entries:
            entry["raw_data"]["checked"] = True
        return entries

[!IMPORTANT] If you are using a schema_model, the pipeline will output the contents of validated_data for successful records.

  • To modify data before validation, use pre_validation_hooks and modify entry["raw_data"].
  • To modify data after validation (and ensure it reaches the output), use post_validation_hooks and modify entry["validated_data"].

Input/Output Adapters

File Formats

Databases

  • SQL Adapters - Read from and write to SQL databases with batch optimization
  • SQL Pagination - High-performance cursor-style pagination for large tables
  • DuckDB Adapters - Analytical database for OLAP workloads

Messaging Systems

Advanced


🛠 Architecture

ZooPipe is designed as a thin Python wrapper around a powerful Rust core:

  1. Python Layer: Configuration, Pydantic models, and custom Hooks.
  2. Rust Core:
    • Adapters: High-speed CSV/JSON/SQL Readers and Writers with optimized batch operations.
    • NativePipe: Orchestrates the loop, fetching chunks, calling a consolidated Python batch processor, and routing result batches.
    • Executors: Single-threaded or multi-threaded batch processing strategies.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

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

zoopipe-2026.1.16.tar.gz (138.4 kB view details)

Uploaded Source

Built Distributions

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

zoopipe-2026.1.16-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl (27.4 MB view details)

Uploaded PyPymanylinux: glibc 2.28+ x86-64

zoopipe-2026.1.16-cp310-abi3-win_amd64.whl (20.9 MB view details)

Uploaded CPython 3.10+Windows x86-64

zoopipe-2026.1.16-cp310-abi3-manylinux_2_28_x86_64.whl (27.4 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.28+ x86-64

zoopipe-2026.1.16-cp310-abi3-manylinux_2_28_aarch64.whl (25.9 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.28+ ARM64

zoopipe-2026.1.16-cp310-abi3-macosx_11_0_arm64.whl (22.9 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

zoopipe-2026.1.16-cp310-abi3-macosx_10_12_x86_64.whl (24.1 MB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

Details for the file zoopipe-2026.1.16.tar.gz.

File metadata

  • Download URL: zoopipe-2026.1.16.tar.gz
  • Upload date:
  • Size: 138.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for zoopipe-2026.1.16.tar.gz
Algorithm Hash digest
SHA256 df965c395a07147e7ddeb0ebecbec19dd4ae6decb3805019d10de451670d3d8b
MD5 0b09a2cdc74bf58ed08682198b0c6d41
BLAKE2b-256 1b03295434fc83ff3f77d3c6332004dac503ef233395ab291014f0e695dc6660

See more details on using hashes here.

Provenance

The following attestation bundles were made for zoopipe-2026.1.16.tar.gz:

Publisher: release.yml on albertobadia/zoopipe

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

File details

Details for the file zoopipe-2026.1.16-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for zoopipe-2026.1.16-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6ab07e014f0be25993c0035054b04aa198d0c91343cb673461d8412a5f0e8a56
MD5 a3c3da3e046f55c70edfb02b13a2ccc5
BLAKE2b-256 3fac92a3fd3007a9d2cf05cacbf5565b255785a3eae70f72012a65c539ca2ed9

See more details on using hashes here.

Provenance

The following attestation bundles were made for zoopipe-2026.1.16-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl:

Publisher: release.yml on albertobadia/zoopipe

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

File details

Details for the file zoopipe-2026.1.16-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: zoopipe-2026.1.16-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 20.9 MB
  • Tags: CPython 3.10+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for zoopipe-2026.1.16-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 58121332848efe345ebbb6e95653064f425f0f916751756fd57c78a4eb589a54
MD5 25febdd97b7811142350cd03b2af63bd
BLAKE2b-256 f077716861833c189b411f09d659fb48a88d045176a6c7167725cb75a1052fe3

See more details on using hashes here.

Provenance

The following attestation bundles were made for zoopipe-2026.1.16-cp310-abi3-win_amd64.whl:

Publisher: release.yml on albertobadia/zoopipe

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

File details

Details for the file zoopipe-2026.1.16-cp310-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for zoopipe-2026.1.16-cp310-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 031666f1dccd6250ec6dd32f8f542d0f920482840a1f9677589f0dbac4afdb40
MD5 25d4c6792a24ef679d7f5cbd9073fa71
BLAKE2b-256 1b9656b6387e17bcd184558a226a8ad5df75efa4b2806262fbeb06c806f812e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for zoopipe-2026.1.16-cp310-abi3-manylinux_2_28_x86_64.whl:

Publisher: release.yml on albertobadia/zoopipe

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

File details

Details for the file zoopipe-2026.1.16-cp310-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for zoopipe-2026.1.16-cp310-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 4adfcc49542c3f08dc0c90b02580437db6d17b94ef3e9279d19e30706a99f1f4
MD5 a4a7366f5c0c861c283755e685e81b85
BLAKE2b-256 bb22f975713d87c195ca82da6067e8b048da7d4a4e0782ba84c42316604303d5

See more details on using hashes here.

Provenance

The following attestation bundles were made for zoopipe-2026.1.16-cp310-abi3-manylinux_2_28_aarch64.whl:

Publisher: release.yml on albertobadia/zoopipe

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

File details

Details for the file zoopipe-2026.1.16-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for zoopipe-2026.1.16-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6750bd6a09c94f8526c5e0077d86556aacf40ef8faa2ed03940e8a864e36cf9d
MD5 cf1cfb47038999be0c214aa202552209
BLAKE2b-256 89cdbf393b57526f75855a52cd10d9bdb39ba05297e72d643ac72640f13a3f88

See more details on using hashes here.

Provenance

The following attestation bundles were made for zoopipe-2026.1.16-cp310-abi3-macosx_11_0_arm64.whl:

Publisher: release.yml on albertobadia/zoopipe

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

File details

Details for the file zoopipe-2026.1.16-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for zoopipe-2026.1.16-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 a1e6b41b9028992062e1370f8e21513ca9f56bd741f0edf488ff6379664e778a
MD5 bc32b45ef113b403cfe34cd5c264f129
BLAKE2b-256 0e1c06365c8b6df18a958e45dc07740b8f6be422d6734aa3d81681cf0d228eaf

See more details on using hashes here.

Provenance

The following attestation bundles were made for zoopipe-2026.1.16-cp310-abi3-macosx_10_12_x86_64.whl:

Publisher: release.yml on albertobadia/zoopipe

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