Skip to main content

A lightweight, composable pipeline abstraction built around a hierarchical data container.

Project description

xileh

CI codecov Tests Python

A lightweight, composable pipeline abstraction built around a hierarchical data container.

xileh_gif

Overview

xileh abstracts complex processing pipelines, motivated by sklearn.Pipeline but with data capacities going beyond a feature matrix X and target y. It is built from two components:

  • xData — a hierarchical container holding data, a header (description / control flags), and meta information. It can nest other xData objects to pass multiple data entities through a pipeline.
  • xPipeline — an ordered set of plain Python functions, each taking and returning an xData object.

schematic

Why build something new?

Placing libraries on two axes — built-in functionality and specificity / restrictionsxileh deliberately aims for minimal built-in functionality and maximal freedom of customization.

func_spec_landscape

sklearn.Pipeline is great for ML pipelines but specific about data shape and the fit/transform contract. Config-driven tools like hydra provide a single source of truth but impose a format that can hinder rapid prototyping. xileh instead:

  • imposes as few restrictions on your workflow as possible (arbitrary data objects and plain Python functions),
  • integrates easily with a function-based workflow during development,
  • provides a single source of truth for the processing,
  • enables reuse of whole pipelines by strongly motivating composition.

Installation

pip install xileh

The bare install is lite (numpy only). Optional data backends are available as extras:

pip install xileh[pandas]   # pandas DataFrame/Series save & load (parquet)
pip install xileh[polars]   # polars DataFrame/Series save & load (parquet)

Saving or loading a container that holds a backend-specific type without the corresponding extra installed raises an error pointing at the extra to install.

Or from source:

git clone git@github.com:matthiasdold/xileh.git
cd xileh
pip install -e .

xileh targets Python 3.11+.

Quick example

from xileh import xData, xPipeline


def add_ones(pdata, name="ones", size=3):
    pdata.add([1] * size, name=name)
    return pdata


pl = xPipeline("demo")
pl.add_steps(("add_ones", add_ones))

root = xData([], name="root")
pl.eval(root)

The container was renamed from xPData to xData; xPData remains available as a backwards-compatible alias.

Documentation

Full documentation, including a quick-start guide, worked examples, and the API reference, is available at matthiasdold.github.io/xileh.

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

xileh-0.3.5.tar.gz (28.0 kB view details)

Uploaded Source

Built Distribution

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

xileh-0.3.5-py3-none-any.whl (22.8 kB view details)

Uploaded Python 3

File details

Details for the file xileh-0.3.5.tar.gz.

File metadata

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

File hashes

Hashes for xileh-0.3.5.tar.gz
Algorithm Hash digest
SHA256 77eba5604c044b0aac62e3c85c9e59757ece80a303cffc30592797032c851748
MD5 2200093773cdcd8c8deb649e990e0b2a
BLAKE2b-256 ed38439c2faf14007ffdae12f8bc1bea7ce28570f7508a6907f2c56bdb43fb3f

See more details on using hashes here.

Provenance

The following attestation bundles were made for xileh-0.3.5.tar.gz:

Publisher: publish-pypi.yml on matthiasdold/xileh

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

File details

Details for the file xileh-0.3.5-py3-none-any.whl.

File metadata

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

File hashes

Hashes for xileh-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d30fc11ac4470c6ec2d27c438c9d1073e7ef540a5106d61eb7a24ab48cb0a9a6
MD5 745cb9d321f0fbb27390f9d60de63d88
BLAKE2b-256 4d4613adb55142bc4dba7d78fd8daf8e976cc4a575e48ddb980aa519c3fd1ad3

See more details on using hashes here.

Provenance

The following attestation bundles were made for xileh-0.3.5-py3-none-any.whl:

Publisher: publish-pypi.yml on matthiasdold/xileh

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