Skip to main content

⚡ Zetten

The High-Performance Task Runner for Python Backends. Parallel. Deterministic. Fast.

PyPI - Version PyPI - License PyPI - Python Version Nightly Build

Zetten is a dependency-aware execution engine designed to unify how you run tests, linters, and builds. It ensures that your workflow remains identical across local development environments and any CI platform, only faster.


The Zetten Philosophy

Modern Python projects often require coordinating various tools (tests, type-checkers, formatters). Zetten eliminates "Glue Code Fatigue" by providing:

  • Parallel Execution: Automatically identifies independent tasks and runs them concurrently across your CPU cores.
  • Three-Tier Variable System: Advanced command templating with a strict priority hierarchy: CLI Flags (-k) > Config Vars > Environment Variables.
  • Parallel Execution: Automatically identifies independent tasks and runs them concurrently across your CPU cores.
  • Three-Tier Variable System: Advanced command templating with a strict priority hierarchy: CLI Flags (-k) > Config Vars > Environment Variables.
  • Smart Caching: Uses content-addressable hashing to skip tasks if their specific inputs haven't changed since the last run.
  • Platform Agnostic: Behaves identically on macOS, Windows, Linux, or any CI/CD provider.
  • Dependency Awareness: Define a Directed Acyclic Graph (DAG) of tasks to ensure correct execution order (e.g., setup always precedes test).

🤖 AI-First (Vibe Coding)

Zetten is designed to be the "API" for ANY AI agent. It comes with built-in configuration files for:

  • Cursor (.cursorrules)
  • Windsurf (.windsurfrules)
  • GitHub Copilot (.github/copilot-instructions.md)
  • Claude Code (CLAUDE.md)

These files automatically point your AI to docs/ai_context.md, ensuring it knows exactly how to build, test, and run your project without hallucinating commands.

"Zetten allows me to just tell Cursor 'run the tests' and it knows exactly what to do, efficiently."


Features

  • ⚡ Worker Pool Concurrency: Maximizes resource usage by running non-dependent tasks in parallel.
  • 🏷️ CI Tagging: Execute logical groups of tasks (e.g., run --tag ci) with a single command.
  • 🛡️ Failure Propagation: If a foundational task fails, Zetten halts downstream execution to prevent cascading errors.
  • 🔍 Intelligent Diagnostics: Includes ztn doctor to identify environment inconsistencies instantly.
  • ⏱️ Performance Analytics: (Coming Soon) Real-time insights into time saved via parallelism.


Performance

Zetten is built for speed. Benchmarks against popular task runners show it provides the fastest developer experience for incremental builds.

Metric Tool Time vs Zetten
Startup ztn 2.08 ms 1.00x
(CLI overhead) just 2.15 ms 1.04x
make 3.85 ms 1.85x
poe 41.88 ms 20.15x
Smart Caching ztn 3.49 ms 1.00x
(No-op re-run) just 4.26 ms 1.22x
make 5.63 ms 1.61x
poe 64.68 ms 18.52x

> Benchmarks run on macOS (Apple Silicon). Startup measures tool --version. Smart Caching measures time to detect no input changes and skip execution.

See Full Methodology & Detailed Results


🛠️ Quick Start

Install Zetten:

pip install zetten

Initiate a project:

ztn init

For Python script execution:

[tool.zetten.tasks.hello]
script = "my_module:main"  # Runs: python -c "import my_module; my_module.main()"
description = "Run a python function"

Define tasks in pyproject.toml:

[tool.zetten.tasks.lint]
cmd = "ruff check src"
inputs = ["src/"]
tags = ["ci"]

[tool.zetten.tasks.test]
cmd = "pytest"
depends_on = ["lint"]
inputs = ["src/", "tests/"]
tags = ["ci"]

[tool.zetten.tasks.build]
description = "Build the project"
# Supports Fallback Syntax: ${VAR:-default}
cmd = "mkdir -p ${build_dir} && python -m build --outdir ${DEST:-dist}"
depends_on = ["lint"]
inputs = ["src/"]

Define tasks in zetten.toml:

[tasks.setup]
cmd = "pip install -r requirements.txt"

[tasks.lint]
cmd = "ruff check src"
inputs = ["src/"]
tags = ["ci"]

[tasks.test]
cmd = "pytest"
depends_on = ["setup"]
inputs = ["src/", "tests/"]
tags = ["ci"]

Run tasks:

ztn run test
ztn run lint test

Zetten will only re-run tasks when their inputs change.


The Variable Hierarchy

Zetten uses a deterministic three-tier system to resolve variables:

  • Tier 1 (CLI): ztn run build -k build_dir=output (Highest Priority)
  • Tier 2 (Config): Values defined in [tool.zetten.vars]
  • Tier 3 (Env): System environment variables (e.g., $USER, $PATH)

Running in CI

Zetten is designed for the modern CI/CD pipeline. By using Tags and Strict Mode, you can ensure your pipeline is both flexible and safe.

# Force a specific version and environment in CI
ztn run --tag ci -k VERSION=${GITHUB_SHA} -k ENV=prod

If a foundational task fails, Zetten halts downstream execution immediately to save CI minutes and prevent cascading failures.

Configuration Model

Configuration is explicit by design:

  • No templating
  • No conditionals
  • No implicit behavior

Configuration lives in:

  • pyproject.toml (preferred)
  • zetten.toml (for legacy or minimal projects)

If no configuration is found, Zetten will explain how to resolve the issue.


Commands

  • ztn run <tasks> — Execute tasks with parallel dependency resolution.
  • ztn run <task> -k KEY=VAL — Override any variable via the CLI.
  • ztn watch <tasks> — Precision re-runs on input changes.
  • ztn graph — Visualizes the Directed Acyclic Graph (DAG) of your tasks.
  • ztn doctor — Diagnoses configuration and environmental health issues.
  • ztn init — Interactive project setup and template generation.

🛡 Status

Zetten is currently in v1.3.2. If no configuration file is found, Zetten will provide clear instructions on how to initialize your project.


Documentation

Full documentation is available at: docs.zetten.in


🤝 Contributing

We love Rust and Python! If you want to help make Zetten even faster:

  • Fork the repo.
  • Add your feature (don't forget the tests!).
  • Open a Pull Request.

Built with ❤️ for the Python community using the speed of Rust.

Please open an issue or discussion on GitHub before proposing large changes.

Metadata

Release files for zetten 1.3.4

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

Built distributions (wheels)

Table of built distributions (wheels) for zetten 1.3.4
File
zetten-1.3.4-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
zetten-1.3.4-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl Python 3 none Linux glibc 2.5+ x86-64 Details
zetten-1.3.4-py3-none-macosx_11_0_x86_64.whl Python 3 none macOS 11.0+ x86-64 Details
zetten-1.3.4-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details

Total release size: 6.8 MB

Release files / zetten-1.3.4-py3-none-win_amd64.whl

Download URL zetten-1.3.4-py3-none-win_amd64.whl
Size 1.8 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
7d075b6e70f0d4cfb5fd92d45934e3fb20b1ea4ea7eee677c2b78b2c77bef9c1
BLAKE2b-256 checksum
How to use checksums
0b22b4cf6e86ccc0bbb7ca7f1b9df07e1ae422553193166499f097b6f4a09a71
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.11.5

Release files / zetten-1.3.4-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl

Download URL zetten-1.3.4-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Size 1.9 MB
Tags Linux glibc 2.5+ x86-64 Python 3
SHA-256 checksum
How to use checksums
ed23cec8cbd995dc63d17b4ae2b8656fa248f7b1fd88ae903bd1746986a01592
BLAKE2b-256 checksum
How to use checksums
550e566bb5c290554b8c539bec1d2c40117483d3805ad7cadbcc200fc632deec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.11.5

Release files / zetten-1.3.4-py3-none-macosx_11_0_x86_64.whl

Download URL zetten-1.3.4-py3-none-macosx_11_0_x86_64.whl
Size 1.7 MB
Tags Python 3 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
556523a0c581437d8739620fcefda9ed232412c7d1475218c0b5a991ca14b4bb
BLAKE2b-256 checksum
How to use checksums
08d891672863fd20426b428ba70b4e452022e2bb10011a8666497f488bd0139e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.11.5

Release files / zetten-1.3.4-py3-none-macosx_11_0_arm64.whl

Download URL zetten-1.3.4-py3-none-macosx_11_0_arm64.whl
Size 1.6 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
958b1dde395e3439bb19515af1eb04a8d7978c24ad8d9d372b5c23164403fd3e
BLAKE2b-256 checksum
How to use checksums
d2952a9126a003c5e9cedc077d7e4b3c0690444fff515d0e4b18b8b250d9de8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.11.5

Security for zetten 1.3.4

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.

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