Add your description here
Project description
Zendata
📦 Zendata Framework
A lightweight Python library that standardizes input and output data handling across data processing pipelines. It provides a clean structure for defining tasks and services using Pydantic to validate both input and output data types at runtime.
✨ Features
- ✅ Enforces strict typing and validation using
pydantic - ⚙️ Separates business logic from data structure
- 🔁 Reusable services with runtime checks
- 🧪 Simple to test and extend
📚 Why Use This?
When working with data pipelines, it's common to pass data between stages without validating it — leading to subtle bugs or type mismatches. This framework provides a standard way to wrap each step in a Task that holds both input and output, and a Service that processes data while validating contracts.
🚀 Quick Start
1. Define a Task
from zendata.tasks.base import BaseTask, TaskStatus
task_definition = BaseTask(
name="Task",
input=int,
output=int,
)
2. Create a Service
from zendata.tasks.service import Service,
from zendata.tasks.task import Task, TaskStatus
class MyService(Service):
def apply(self, task: Task) -> Task:
# Your core logic
task.output_data = task.input_data * 2
return task
3. Run the Service
service = MyService(task_definition=task_definition, name="MultiplyByTwo")
result_task: Task = service.run(123) # Will raise if types mismatch
print(result_task.output_data)
📦 Install
uv sync
🧪 Testing
make test
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
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 zendata-0.1.1.tar.gz.
File metadata
- Download URL: zendata-0.1.1.tar.gz
- Upload date:
- Size: 27.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
594cf132ca3b9a640c99b21388c6834360332a26110541a52fe969804de88505
|
|
| MD5 |
890618c0f59686d25233bfe160688be4
|
|
| BLAKE2b-256 |
8234a9c0509a2fb2b19c76dcd97d8168f3369a7f992a9185d95ae6de790d5893
|
File details
Details for the file zendata-0.1.1-py3-none-any.whl.
File metadata
- Download URL: zendata-0.1.1-py3-none-any.whl
- Upload date:
- Size: 25.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
65eaeba0ca6a53403970923426424cbcc9480f1d64d71cd85cff7c657ab05820
|
|
| MD5 |
82e0f17e21ea7aa4d81d0963e1c9a442
|
|
| BLAKE2b-256 |
7017feb3faf40cd52a3f2f43e9786c7ffab12e5bd37e97abdaaeb695390ef32c
|