Skip to main content

A simple and efficient workflow framework for Python

Project description

Nanoflow

PyPI - Python Version pypi PyPI - Downloads LICENSE
CodSpeed Badge
uv ruff Gitmoji

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
  • Dynamic update resource pool

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 Downloads

Installation using pip/pipx/uv

Before this, please ensure that Python 3.12 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nanoflow-0.9.0.tar.gz (22.8 kB view details)

Uploaded Source

Built Distribution

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

nanoflow-0.9.0-py3-none-any.whl (24.2 kB view details)

Uploaded Python 3

File details

Details for the file nanoflow-0.9.0.tar.gz.

File metadata

  • Download URL: nanoflow-0.9.0.tar.gz
  • Upload date:
  • Size: 22.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for nanoflow-0.9.0.tar.gz
Algorithm Hash digest
SHA256 8c1088d923a207e1c7d61d7017e3dc770db4831f3364639de25a014c7e669324
MD5 c3725243f1ad847dbe494d9bd000df48
BLAKE2b-256 c1b232e0f11432fef3cb4ce34095be44adcc977b5eb769e4f40e6b1ae9281655

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanoflow-0.9.0.tar.gz:

Publisher: release.yml on zrr-lab/nanoflow

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nanoflow-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: nanoflow-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 24.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for nanoflow-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 65e06206491dbcb966a89cea52f95a880b1d30633e0aa0ce53b0c3b37bc35234
MD5 2abe3706a1a943d118d174fa16ddf23d
BLAKE2b-256 a3e78f2dc5b5093824c51a3837059afae50f619c8be20560c168e26495a30d5e

See more details on using hashes here.

Provenance

The following attestation bundles were made for nanoflow-0.9.0-py3-none-any.whl:

Publisher: release.yml on zrr-lab/nanoflow

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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