Skip to main content

Fast task runner for Python projects

Project description

⚡ Zetten

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

PyPI - Version PyPI - License PyPI - Python Version CI Status

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.
  • 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).

✨ 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 zetten doctor to identify environment inconsistencies instantly.
  • ⏱️ Performance Analytics: (Coming Soon) Real-time insights into time saved via parallelism.

🛠️ Quick Start

Install Zetten:

pip install zetten

Initiate a project:

zetten init

Define tasks in pyproject.toml:

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

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

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:

zetten run test
zetten run lint test

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


🚀 Running in CI

Zetten is designed to be the single entry point for your CI pipelines. By using Tags, you can control exactly what runs without complex YAML logic. Order of Execution: If you run zetten run --tag ci, Zetten calculates the dependency tree:

  • It identifies tasks with no dependencies (e.g., lint).
  • It executes them in parallel.
  • Once lint succeeds, it "unlocks" and runs the test.
  • Skipping: If the files in src/ haven't changed since the last CI run (and you persist the .zetten folder), Zetten will skip execution and return immediately.

⚙️ 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 fix it.


🛠 Commands

  • zetten run — execute tasks deterministically
  • zetten watch — re-run tasks on input changes
  • zetten graph — inspect the task dependency graph
  • zetten doctor — diagnose configuration and environment issues
  • All commands produce stable, CI-safe output with well-defined exit codes.

🛡 Status

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


Documentation

Full documentation is available at: Github Wiki


🤝 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.

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

zetten-1.0.7.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

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

zetten-1.0.7-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file zetten-1.0.7.tar.gz.

File metadata

  • Download URL: zetten-1.0.7.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for zetten-1.0.7.tar.gz
Algorithm Hash digest
SHA256 66e396dc047f50f36b3193d8cfbf933fd1f7dca4aea13a548daf62f9e0cf5001
MD5 7373f29faf66917d8f7fa755764f2385
BLAKE2b-256 71f32720bb2b8f038a91c0d43ccab0c4a7c9cafba06a4fc4d97488a67a0a3543

See more details on using hashes here.

File details

Details for the file zetten-1.0.7-py3-none-any.whl.

File metadata

  • Download URL: zetten-1.0.7-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for zetten-1.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 8a0fc301a2b329a989a5e0ac59ce5c65e4cf2deb30f4b41a2a75aec1e8129889
MD5 a0626167ec42ca9643e80f378bd6cc9a
BLAKE2b-256 47260e33c26d4da4adc931ed4cfeea18097b88014dd1ef73abc8bc89b6cf4f10

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