A lightweight, composable pipeline abstraction built around a hierarchical data container.
Project description
xileh
A lightweight, composable pipeline abstraction built around a hierarchical data container.
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 otherxDataobjects to pass multiple data entities through a pipeline.xPipeline— an ordered set of plain Python functions, each taking and returning anxDataobject.
Why build something new?
Placing libraries on two axes — built-in functionality and
specificity / restrictions — xileh deliberately aims for minimal built-in
functionality and maximal freedom of customization.
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
xPDatatoxData;xPDataremains 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
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xileh-0.2.1.tar.gz.
File metadata
- Download URL: xileh-0.2.1.tar.gz
- Upload date:
- Size: 27.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e164e2b930a11da08426fc2321258f9e90391754a50dad5b9b5aab78df596ee3
|
|
| MD5 |
35ce06d7ceb5b7b3f81555701c90497a
|
|
| BLAKE2b-256 |
a45842bcb7ac64528249264d217c3f55578dd0bc347e507b3b5e0812bcc62896
|
Provenance
The following attestation bundles were made for xileh-0.2.1.tar.gz:
Publisher:
publish-pypi.yml on matthiasdold/xileh
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xileh-0.2.1.tar.gz -
Subject digest:
e164e2b930a11da08426fc2321258f9e90391754a50dad5b9b5aab78df596ee3 - Sigstore transparency entry: 1719396273
- Sigstore integration time:
-
Permalink:
matthiasdold/xileh@6970c80655dc5e71ff33ce19afd7a3b7455d862b -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/matthiasdold
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@6970c80655dc5e71ff33ce19afd7a3b7455d862b -
Trigger Event:
push
-
Statement type:
File details
Details for the file xileh-0.2.1-py3-none-any.whl.
File metadata
- Download URL: xileh-0.2.1-py3-none-any.whl
- Upload date:
- Size: 22.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10f3075d55b848b740d0e71baa9c12b973b0de6971a5a5dc7d015f2edeafab26
|
|
| MD5 |
dc9f4ea41d18a5b362b16b2138dd52dc
|
|
| BLAKE2b-256 |
49916b0707c68b2d83de83f1b8983f09a3fea38ddf558571aa7355046c61ae50
|
Provenance
The following attestation bundles were made for xileh-0.2.1-py3-none-any.whl:
Publisher:
publish-pypi.yml on matthiasdold/xileh
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xileh-0.2.1-py3-none-any.whl -
Subject digest:
10f3075d55b848b740d0e71baa9c12b973b0de6971a5a5dc7d015f2edeafab26 - Sigstore transparency entry: 1719396446
- Sigstore integration time:
-
Permalink:
matthiasdold/xileh@6970c80655dc5e71ff33ce19afd7a3b7455d862b -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/matthiasdold
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@6970c80655dc5e71ff33ce19afd7a3b7455d862b -
Trigger Event:
push
-
Statement type: