Skip to main content

Typed, contract-driven data pipeline modeling for Python.

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

Pipelantic banner

Pipelantic

Documentation Status

Define, validate, plan, and locally run contract-driven data pipelines with typed Python.

Define data, transformations, and pipelines with typed Python classes. Validate and plan them once. Execute them through interchangeable backends.

Status

0.4.0 — Local Runtime and Operational Model

Pipelantic provides the typed modeling kernel, contract interoperability, an immutable secret-free PipelinePlan, and a local async runtime that executes plans via Python callables, in-memory artifacts, and stdlib JSON/CSV bindings.

Use Pipelantic when you want to catch incompatible wiring before processing data, generate ODCS/DTCS/DPCS contracts from Python, or inspect a deterministic execution plan independently of a future backend.

Pipelantic is currently alpha. Pandas, Polars, SQL, Spark, Airflow, and other external backend plugins are design work and are not included in 0.4.

See the hosted documentation for the full design, CHANGELOG.md for release notes, and Roadmap for sequencing.

Install

pip install pipelantic
# or
uv add pipelantic

Development

Requires uv.

uv sync
uv run pytest
uv run ruff check .
uv run ruff format .

uv sync creates .venv, installs the package in editable mode, and installs the dev dependency group (pytest, ruff, mkdocs) by default.

Release

Tag a version that matches src/pipelantic/_version.py, then push the tag:

git tag v0.4.0
git push origin v0.4.0

GitHub Actions runs checks and publishes to PyPI using the PYPI_API_TOKEN repository secret.

Quick example

from pipelantic import (
    Data,
    Input,
    Output,
    Pipeline,
    PipelineRuntime,
    Sink,
    Source,
    Transformation,
)


class RawCustomer(Data):
    customer_id: int
    first_name: str
    last_name: str


class Customer(Data):
    customer_id: int
    full_name: str


class NormalizeCustomers(Transformation):
    customers: Input[RawCustomer]
    result: Output[Customer]


class CustomerPipeline(Pipeline):
    raw: Source[RawCustomer] = Source(binding="customer_source")
    normalized = NormalizeCustomers.step(customers=raw)
    curated: Sink[Customer] = Sink(
        input=normalized.result,
        binding="customer_sink",
    )


@NormalizeCustomers.implementation("local")
def normalize(customers: list[RawCustomer]) -> list[Customer]:
    return [
        Customer(
            customer_id=row.customer_id,
            full_name=f"{row.first_name} {row.last_name}",
        )
        for row in customers
    ]


CustomerPipeline.validate(profile="development").raise_for_errors()

runtime = PipelineRuntime()
runtime.memory.seed(
    "customer_source",
    [RawCustomer(customer_id=1, first_name="Ada", last_name="Lovelace")],
)
run_report = CustomerPipeline.run(profile="development", runtime=runtime)
print(runtime.memory.get("customer_sink"))

Run the complete tested version at examples/quickstart.py.

Current capability boundary

Capability 0.4
Typed modeling, validation, contracts, and planning Available
Local Python execution and run reports Available
Memory, callable, JSON, CSV, and no-write storage Available
Pandas, Polars, SQL, Spark, and Airflow plugins Not yet available

Documentation

License

MIT

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

pipelantic-0.4.0.tar.gz (109.8 kB view details)

Uploaded Source

Built Distribution

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

pipelantic-0.4.0-py3-none-any.whl (127.3 kB view details)

Uploaded Python 3

File details

Details for the file pipelantic-0.4.0.tar.gz.

File metadata

  • Download URL: pipelantic-0.4.0.tar.gz
  • Upload date:
  • Size: 109.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pipelantic-0.4.0.tar.gz
Algorithm Hash digest
SHA256 1e028f4c56d2d95cc52a4f20b39ccf31d85e99404f8884a67f2e4442627b23e0
MD5 f5ac04974881303b48c1f78a743af019
BLAKE2b-256 2edf1e0d5d7f52fed9123cd125cf35c9bc9d388bad8893afcc245c9249b8d8b7

See more details on using hashes here.

File details

Details for the file pipelantic-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: pipelantic-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 127.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pipelantic-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b9ae7390fe82370a617d20f8a952420df7984d01581e079ed58d23e2f17d3152
MD5 8dc06a7cf27492a17f41a970b0e0802d
BLAKE2b-256 010cbcecf5ff87157a7319fc066e4ea6a51863edd6cb63f1c121b0c87268fb56

See more details on using hashes here.

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