A small Python-native DAG task executor with caching.
Project description
Acyro
English | 简体中文
A small, local, Python-native DAG task runner with deterministic execution and content-aware JSON caching.
Install
pip install acyro
Requires Python 3.12 or newer.
Quick start
from pathlib import Path
from acyro import run, task
@task(inputs=["data/*.txt"], outputs=["build/combined.txt"])
def combine() -> None:
Path("build").mkdir(exist_ok=True)
content = "\n".join(path.read_text() for path in Path("data").glob("*.txt"))
Path("build/combined.txt").write_text(content)
@task(depends=[combine], outputs=["dist/report.txt"])
def report() -> None:
Path("dist").mkdir(exist_ok=True)
Path("dist/report.txt").write_text(Path("build/combined.txt").read_text())
run()
run() executes tasks in dependency order. Later runs mark unchanged tasks as
SKIPPED.
CLI
Put tasks in a Python file, then run or inspect the graph:
acyro run examples/acyrofile.py
acyro graph examples/acyrofile.py
Cache
Successful tasks are cached under .acyro/cache. Fingerprints include task
metadata, source code, input contents, output contents, and dependency
fingerprints. Changing an input or dependency invalidates downstream tasks;
deleting or modifying an output reruns its task.
Input declarations accept explicit files and Glob patterns. Output declarations must be explicit file paths. Paths are resolved from the current working directory, and file contents are hashed with SHA-256. Missing inputs and outputs raise clear errors without replacing the last successful cache record.
Tasks without inputs or outputs retain the original source- and
dependency-based cache behavior. Use run(cache_dir=...) to choose another
cache directory.
Acyro is intentionally serial and local. It has no async runtime, distributed workers, database, retries, or pluggable cache backends.
Development
uv sync --extra dev
uv run pytest -q
uv run ruff check .
uv build
Licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file acyro-0.2.0.tar.gz.
File metadata
- Download URL: acyro-0.2.0.tar.gz
- Upload date:
- Size: 17.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f71c5e445cb4dd86fd85258f3ae7a6547eea1807d497ddd7816ea7ac8174072
|
|
| MD5 |
84dc49887b5a03b0882dccc5973faee9
|
|
| BLAKE2b-256 |
29bd869bf24f5a3d1a728b88c5abe93d9cea6618c490276615ea7c0b4347a94a
|
Provenance
The following attestation bundles were made for acyro-0.2.0.tar.gz:
Publisher:
publish.yml on xjn2005/Acyro
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
acyro-0.2.0.tar.gz -
Subject digest:
1f71c5e445cb4dd86fd85258f3ae7a6547eea1807d497ddd7816ea7ac8174072 - Sigstore transparency entry: 2160160968
- Sigstore integration time:
-
Permalink:
xjn2005/Acyro@20c077306418490d001e954e87ca0d599963a31e -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/xjn2005
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@20c077306418490d001e954e87ca0d599963a31e -
Trigger Event:
release
-
Statement type:
File details
Details for the file acyro-0.2.0-py3-none-any.whl.
File metadata
- Download URL: acyro-0.2.0-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e0ee6970ab89d3d0167a632d30a3a832576db540f2e0e3aa0fee4817336a2b1
|
|
| MD5 |
0794089e9090f326d925f97cf56821a9
|
|
| BLAKE2b-256 |
0e9c7ffaa2d10d1e40d3f2365f2b272342eb95029e7a312174a75a3646ea3e78
|
Provenance
The following attestation bundles were made for acyro-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on xjn2005/Acyro
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
acyro-0.2.0-py3-none-any.whl -
Subject digest:
1e0ee6970ab89d3d0167a632d30a3a832576db540f2e0e3aa0fee4817336a2b1 - Sigstore transparency entry: 2160160999
- Sigstore integration time:
-
Permalink:
xjn2005/Acyro@20c077306418490d001e954e87ca0d599963a31e -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/xjn2005
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@20c077306418490d001e954e87ca0d599963a31e -
Trigger Event:
release
-
Statement type: