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 CLI — start, stop, run, fire, status commands
  • State — Pydantic-based SQLite ORM with schema management and multi-tenant support
  • Portable data types — FrameData, ExposureMatrix, SymmetricMatrix, KeyedVector: JSON in, numpy/pandas/polars/pyarrow out, no library required

Documentation

Full documentation at walnutgeek.github.io/lythonic.

Metadata

Release files for lythonic 0.0.27

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.27
File Size Uploaded Provenance Actions
lythonic-0.0.27.tar.gz 291.7 kB Without provenance Details for lythonic-0.0.27.tar.gz

Built distribution (wheel)

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

Total release size: 390.3 kB

Release files / lythonic-0.0.27.tar.gz

Download URL lythonic-0.0.27.tar.gz
Size 291.7 kB
Tags Source
SHA-256 checksum
How to use checksums
5228471f9c01ecebc4ed26d3f5144a923d23f14de4ad5621792b6831571ae679
BLAKE2b-256 checksum
How to use checksums
026bc8ad645671c986f6a3e5a2ea13fcb431b3ddf97763af31a7eb1db9759cdb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.8.13

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

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

Security for lythonic 0.0.27

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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