Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zendata-0.1.0.tar.gz (26.9 kB view details)

Uploaded Source

Built Distribution

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

zendata-0.1.0-py3-none-any.whl (25.3 kB view details)

Uploaded Python 3

File details

Details for the file zendata-0.1.0.tar.gz.

File metadata

  • Download URL: zendata-0.1.0.tar.gz
  • Upload date:
  • Size: 26.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.2

File hashes

Hashes for zendata-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9dc7d2400db75ceef6d4a3b7d2211f474abb56f9747490cfd543fa05e7e93e77
MD5 8a6b94fce92079994a87227801ccaea2
BLAKE2b-256 1d3f0fdd20495fa887fd395fe90db7dbc42786c2b3f2688fd9cd21ae1d347742

See more details on using hashes here.

File details

Details for the file zendata-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: zendata-0.1.0-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

Hashes for zendata-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b1bfa642f02916cb0e9e1c241458570912218b9917bcefa50a9a02e2a061304f
MD5 584a272b699c037869533ffc6e0db54f
BLAKE2b-256 a19d7300685ab7c04cd34b3923fa6867705f109f3e34073c85f1e2868f2411d6

See more details on using hashes here.

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