A simple and efficient workflow framework for Python
Project description
Nanoflow
Nanoflow is a simple and efficient workflow framework for Python. It allows you to define and execute tasks and workflows with ease.
Features
- Define tasks and workflows using decorators
- Support for task dependencies
- Retry functionality for tasks
- GPU resource management for parallel task execution
- Support flow matrix and task matrix
Roadmap
- Split commands into command and args to avoid too long
- Integration with FastAPI for managing workflows as web APIs
- Enhance TUI, improve task log display, use terminal-like style
- Support for multiple configuration files or folders
- Support for passing parameters and matrix
- Support to depend on a task that has matrix
Installation
Installation using pip/pipx/uv
Before this, please ensure that Python 3.10 or above is installed, along with pip.
pip install nanoflow
If you want to try the Nightly version, you can try
pip install git+https://github.com/zrr1999/nanoflow@main
Before this, please ensure that pipx/uv is installed.
pipx install nanoflow
uv tool install nanoflow
Source Installation
git clone https://github.com/zrr1999/nanoflow
cd nanoflow
pip install .
Usage
To use Nanoflow as a package, you can define tasks and workflows using decorators:
from nanoflow import workflow, task
@task
def task_a():
print("a")
@workflow
async def workflow_a():
await task_a.submit()
if __name__ == "__main__":
workflow_a.run()
To use Nanoflow as a cli or tui, you can use the following command:
nanoflow run examples/simple.toml
nanoflow run examples/simple.toml --use-tui
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
File details
Details for the file nanoflow-0.8.0.tar.gz
.
File metadata
- Download URL: nanoflow-0.8.0.tar.gz
- Upload date:
- Size: 22.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e59bc21d51ba14c6079d6457863aea4fd8bcf9c354d30926ced25d4734c8998 |
|
MD5 | e862c70d629569b46d86e94ee2225b0c |
|
BLAKE2b-256 | 347dad31e67f5f3a4db8f6d97283f496cfa059529a56b88e053d1b8f672ef28a |
Provenance
The following attestation bundles were made for nanoflow-0.8.0.tar.gz
:
Publisher:
release.yml
on zrr-lab/nanoflow
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
nanoflow-0.8.0.tar.gz
- Subject digest:
6e59bc21d51ba14c6079d6457863aea4fd8bcf9c354d30926ced25d4734c8998
- Sigstore transparency entry: 146235644
- Sigstore integration time:
- Predicate type:
File details
Details for the file nanoflow-0.8.0-py3-none-any.whl
.
File metadata
- Download URL: nanoflow-0.8.0-py3-none-any.whl
- Upload date:
- Size: 24.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e4375bc41d75d073e31d9017f1894a0fa6b69f39171c5dbf3a2147e92129a8a |
|
MD5 | 64e290f29465eefe45721cf3d0dcf6f0 |
|
BLAKE2b-256 | 642fbe39e873801291cf13cf39776d3946d8511db93e49dca3620cdd3c7d701c |
Provenance
The following attestation bundles were made for nanoflow-0.8.0-py3-none-any.whl
:
Publisher:
release.yml
on zrr-lab/nanoflow
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
nanoflow-0.8.0-py3-none-any.whl
- Subject digest:
9e4375bc41d75d073e31d9017f1894a0fa6b69f39171c5dbf3a2147e92129a8a
- Sigstore transparency entry: 146235646
- Sigstore integration time:
- Predicate type: