Skip to main content

A simple and efficient workflow framework for Python

Project description

Nanoflow

PyPI - Python Version pypi PyPI - Downloads LICENSE
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

Roadmap

  • 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
  • Split commands into command and args to avoid too long

Installation Downloads

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 examples/simple.toml
nanoflow 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.3.0.tar.gz (20.8 kB view details)

Uploaded Source

Built Distribution

nanoflow-0.3.0-py3-none-any.whl (21.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nanoflow-0.3.0.tar.gz
  • Upload date:
  • Size: 20.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for nanoflow-0.3.0.tar.gz
Algorithm Hash digest
SHA256 49978b59c68d97ee278b4282bdf1b5224eeebe57a340e736dd637b20cbfc6a35
MD5 32330df335e160a7de721d678121125a
BLAKE2b-256 7b1e2527628bfe2263b465f9f16f19bcb24c55d8d7d2ee40b9dae9aad2c0f608

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: nanoflow-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 21.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for nanoflow-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1d2f7d5a08f1938cd1c61a53a818ec2040cc9c5a25f2080f251d5b365946ea5c
MD5 fce368bf24403772210449c6a8084fc5
BLAKE2b-256 9c16a1a9d19184d43ddb558bf1419676a049688fffd7aae14fce5a8afcc2a75f

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page