Skip to main content

Outflow is a framework that helps you build and run task workflows.

The api is as simple as possible while still giving the user full control over the definition and execution of the workflows.

Feature highlight :

  • Simple but powerful API
  • Support for parallelized and distributed execution
  • Centralized command line interface for your pipeline commands
  • Integrated database access, sqlalchemy models and alembic migrations
  • Executions and exceptions logging for tracability
  • Strict type and input/output checking for a robust pipeline

Check out our documentation for more information.

Installing

Install and update using pip:

pip install -U outflow

Quick start

One file starter

First, create a pipeline.py script:

# -- pipeline.py

from outflow.core.commands import Command, RootCommand
from outflow.core.pipeline import Pipeline
from outflow.core.tasks import as_task

# with the as_task decorator, the function will be automatically converted into a Task subclass
# the signature of the function, including the return type, is used to determine task inputs and outputs
@as_task
def GetValues() -> {"word1": str, "word2": str}:
    return {"word1": "Hello", "word2": "world!"}

# default values can also be used as inputs
@as_task
def Concatenate(word1: str, word2: str) -> {"result": str}:
    result = f"{word1} {word2}"
    return result  # you can return the value directly if your task has only one output

# A task can have side-effects and returns nothing
@as_task
def PrintResult(result: str):
    print(result)

@RootCommand.subcommand()
class HelloWorld(Command):
    def setup_tasks(self):
        # instantiate the tasks
        get_values = GetValues()
        concatenate = Concatenate(word2="outflow!")  # you can override task inputs value at instantiation
        print_result = PrintResult()

        # build the workflow
        get_values >> concatenate >> print_result


# instantiate and run the pipeline
with Pipeline(
        root_directory=None,
        settings_module="outflow.core.pipeline.default_settings",
        force_dry_run=True,
) as pipeline:
    result = pipeline.run()

and run your first Outflow pipeline:

$ python pipeline.py hello_world

A robust, configurable and well-organized pipeline

You had a brief overview of Outflow's features and you want to go further. Outflow offers command line tools to help you to start your pipeline project.

First, we will need to auto-generate the pipeline structure -- a collection of files including the pipeline settings, the database and the cluster configuration, etc.

$ python -m outflow management create pipeline my_pipeline

Then, we have to create a plugin -- a dedicated folder regrouping the commands, the tasks as well as the description of the database (the models)

$ python -m outflow management create plugin my_namespace.my_plugin --plugin_dir my_pipeline/plugins/my_plugin

In the my_pipeline/settings.py file, add your new plugin to the plugin list:

PLUGINS = [
    'outflow.management',
    'my_namespace.my_plugin',
]

and run the following command:

$ python ./my_pipeline/manage.py my_plugin

You'll see the following output on the command line:

 * outflow.core.pipeline.pipeline - pipeline.py:325 - INFO - No cluster config found in configuration file, running in a local cluster
 * my_namespace.my_plugin.commands - commands.py:49 - INFO - Hello from my_plugin

Your pipeline is up and running. You can now start adding new tasks and commands.

Contributing

For guidance on setting up a development environment and how to make a contribution to Outflow, see the contributing guidelines.

Download files

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

Source Distribution

outflow-0.9.0.tar.gz (89.5 kB view details)

Uploaded Source

Built Distribution

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

outflow-0.9.0-py3-none-any.whl (134.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: outflow-0.9.0.tar.gz
  • Upload date:
  • Size: 89.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.6 Darwin/24.6.0

File hashes

Hashes for outflow-0.9.0.tar.gz
Algorithm Hash digest
SHA256 648e1f515c4c21be3f903184b163ce0b64e1d6b5d51a43fd055b522bc756661b
MD5 260ada85724ee2c5e18a4922ea19dafb
BLAKE2b-256 244f0967c20c1d5bba99ef22bd7e1338560cd08349ab6817aa3e315c48a1c4c1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: outflow-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 134.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.6 Darwin/24.6.0

File hashes

Hashes for outflow-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fd82df0958ca4b2c00032632f0651d01029ed8a738e8a54ba32e95f6b7dc3621
MD5 5748e2648baa9624f4c63d63485fc543
BLAKE2b-256 5bce6a9f4dfe1a280575220c9761a409d05303257a78565892c25303586ceb67

See more details on using hashes here.

Release history Release notifications | RSS feed

0.9.2

2 files

0.9.1

2 files

This release

0.9.0 This release

2 files

0.7.1

2 files

0.7.0

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.7

2 files

0.5.5

2 files

0.5.4

2 files

0.5.3

2 files

0.5.2

2 files

0.5.1

2 files

0.5.0

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page