Pipeline Building Toolkit
pplkit is a lightweight Python library that provides a unified interface for
reading and writing data across multiple file formats, including CSV, JSON,
YAML, TOML, Parquet, and Pickle. It simplifies data pipeline workflows by
managing named directories and automatically dispatching I/O operations based
on file extensions.
For full documentation, visit the pplkit docs.
Installation
pip install pplkit
Quick Start
from pplkit.io import IOManager
iom = IOManager(input="path/to/input", output="path/to/output")
# Load data based on file extension
data = iom.load("data.csv", key="input")
# Dump data based on file extension
iom.dump(data, "data.parquet", key="output")
Using Loaders and Dumpers Directly
The get_loader and get_dumper functions can be used independently of
IOManager for lower-level control:
from pplkit.io import get_loader, get_dumper
# Get a loader/dumper by file extension
loader = get_loader(".json")
dumper = get_dumper(".json", obj_type=object)
data = loader("path/to/data.json")
dumper(data, "path/to/output.json")
Registering Custom Handlers
You can register your own loader or dumper for any suffix and object type:
import pathlib
import typing
import numpy as np
import numpy.typing as npt
from pplkit.io import register_loader, register_dumper
@register_loader(".npy", object)
def load_npy(path: pathlib.Path, **options: typing.Any) -> npt.NDArray:
return np.load(path, **options)
@register_dumper(".npy", object)
def dump_npy(
obj: npt.NDArray, path: pathlib.Path, **options: typing.Any
) -> None:
np.save(path, obj, **options)
Metadata
Release files for pplkit 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pplkit-1.0.0.tar.gz | 9.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pplkit-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.9 kB
Release files / pplkit-1.0.0.tar.gz
| Download URL | pplkit-1.0.0.tar.gz |
|---|---|
| Size | 9.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
69c3a0e167c58c8f5ded1212583b69869fdd929f61bdf7991c44cfb59ea646e2
|
|
BLAKE2b-256 checksum How to use checksums |
e38b4ce383a144ce4b188965bfce6a6c77d9fa76999d96700c1f25fbdafc61e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / pplkit-1.0.0-py3-none-any.whl
| Download URL | pplkit-1.0.0-py3-none-any.whl |
|---|---|
| Size | 9.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ee398cd5fc8aba90915ad4665c4fa90db1ec892b620c66b9c6381c53c5c0a70f
|
|
BLAKE2b-256 checksum How to use checksums |
969f670a6cb4ceec32eaf4ca4f181a5f3b7d8691245de7ee77a2076b4db04aee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|