Skip to main content

lythonic

PyPI version Documentation

Compose Python logic into data-flow pipelines — sync or async, run anywhere.

Write plain Python functions. Wire them with >>. Data flows visibly between nodes — you can see what went in, what came out, what failed. Unlike task schedulers where jobs are opaque units, lythonic tracks the data itself.

Quick Start

uv add lythonic
from lythonic.compose.namespace import Dag

def fetch(url: str) -> dict:
    return {"source": url, "values": [1, 2, 3]}

def double(data: dict) -> dict:
    return {**data, "values": [v * 2 for v in data["values"]]}

dag = Dag()
dag.node(fetch) >> dag.node(double)

# Run it — sync or async, doesn't matter
import asyncio
result = asyncio.run(dag(url="https://example.com"))
print(result.outputs)  # {"double": {"source": "...", "values": [2, 4, 6]}}

Why lythonic?

Data flow, not task flow. Each node receives typed data from upstream and passes results downstream. The DAG runner wires inputs to outputs by type — fan-out, fan-in, and map-reduce built in. Provenance tracking records what data flowed through each edge.

Compose freely. DAGs nest inside DAGs. dag.node(sub_dag) runs a sub-DAG as a single step. dag.map(sub_dag) runs it on each element of a collection, concurrently. Build small, reuse everywhere.

Run transparently. await dag() for a quick test. DagRunner with provenance for production. lyth start for a long-running engine with cron-triggered pipelines. Same code, different execution context.

Sync and async — mixed freely. Write sync functions, async functions, or both in the same DAG. Sync nodes run in a thread executor automatically.

Features

  • DAG composition>> wiring, callable DAGs, MapNode, CallNode
  • @dag_factory — define reusable DAG templates as decorated functions
  • Triggers — cron-scheduled or push-triggered execution via TriggerManager
  • Provenance — SQLite-backed tracking of runs, node executions, edge traversals
  • Caching — per-callable SQLite cache with probabilistic TTL refresh
  • lyth CLIstart, stop, run, fire, status commands
  • State — Pydantic-based SQLite ORM with schema management and multi-tenant support

Documentation

Full documentation at walnutgeek.github.io/lythonic.

Release files for lythonic 0.0.22

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lythonic 0.0.22
File Size Uploaded
lythonic-0.0.22.tar.gz 236.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lythonic 0.0.22
File Interpreter ABI Platform
lythonic-0.0.22-py3-none-any.whl Python 3 none any Details

Total release size: 315.3 kB

Release files / lythonic-0.0.22.tar.gz

Download URL lythonic-0.0.22.tar.gz
Size 236.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d1e9d07c817ceba54ec88e0cb3181ca48663630fd0875041bc76db2aa0265e13
BLAKE2b-256 checksum
How to use checksums
61141621e9efab35f641e925ce3d06cd16faf7daa981e6fd55a8514e6f56b4be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.8.13

Release files / lythonic-0.0.22-py3-none-any.whl

Download URL lythonic-0.0.22-py3-none-any.whl
Size 78.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e9dfcd1c15d982399c10963cfa3639c0c12cb365743e3b6f8db1aadcc84be69a
BLAKE2b-256 checksum
How to use checksums
2ec739699ca1ccb4cae5c1132219e78ea27328ce596cda3a5157c0c7fc791058
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.8.13

Release history Release notifications | RSS feed

0.0.24

2 release files

0.0.23

2 release files

This release

0.0.22 This release

2 release files

0.0.21

2 release files

0.0.20

2 release files

0.0.16

2 release files

0.0.15

2 release files

0.0.14

2 release files

0.0.13

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page