A library for explicit data pipelines
Reason this release was yanked:
Placeholder version, non functional
Project description
Tacit
A library for building explicit Data Pipelines.
Main features:
- Define input and output contracts as schemas
- Run validation over the contracts
- Use the schemas in the pipeline implementation
import polars as pl
import tacit
class Iris(tacit.Schema):
sepal_length: float # TODO(alvaro): Specify min / max values
sepal_width: float
petal_length: float
petal_width: float
# FIXME(alvaro): Add schema composition (maybe using inheritance? is there a different way?)
class IrisPrediction(tacit.Schema):
sepal_length: float
sepal_width: float
petal_length: float
petal_width: float
custom_feature: float
species: Literal["setosa", "versicolor", "virginica"]
def process_data(df: Iris) -> IrisPrediction:
model = load_model()
df = df.with_columns((pl.col(Iris.sepal_length) ** 2 / pl.col(Iris.petal_width)).alias(IrisPrediction.custom_feature))
df = df.with_columns(pl.Series(IrisPrediction.custom_feature, model.predict(df))
return df
def pipeline():
raw_df = load_iris()
df, errors = Iris.validate(df, strict=True)
if errors:
print(errors.pretty())
return
# At this point, `df` is guaranteed to be a Iris instance
res_df = process_data(df)
return res_df
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tacit-0.1.0.tar.gz
(1.3 kB
view details)
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
tacit-0.1.0-py3-none-any.whl
(2.1 kB
view details)
File details
Details for the file tacit-0.1.0.tar.gz.
File metadata
- Download URL: tacit-0.1.0.tar.gz
- Upload date:
- Size: 1.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc1c9f86dc1ac2b32be0e197b8506d09a9e10f9df751b4acc9032fcbe786b805
|
|
| MD5 |
7203f76d9a7b6290c624d1d7e55d61c2
|
|
| BLAKE2b-256 |
e555e208b1576fef34477b86ca9890290288005963402d672e93be0e8b0c0196
|
File details
Details for the file tacit-0.1.0-py3-none-any.whl.
File metadata
- Download URL: tacit-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
506a15b39599e9cdac8972fc4c8c0d3d433d0c6b1d469c7043251eaa96e2063a
|
|
| MD5 |
ca76dc9322fd87d15996986e0b021adc
|
|
| BLAKE2b-256 |
789bd6db6078dc05347920459ff97111c7e135b137173ff71cb8bea6644fdb77
|