Framework for running Tasks and from CLI and API for orchestation. Component-based Task builder/Runner for non-programmers.
Project description
FlowTask DataIntegration
FlowTask DataIntegration is a plugin-based, component-driven task execution framework for create complex Tasks.
FlowTask runs Tasks defined in JSON, YAML or TOML files, any Task is a combination of Components, and every component in the Task run sequentially or depend of others, like a DAG.
Can create a Task combining Commands, Shell scripts and other specific Components (as TableInput: Open a Table using a datasource, DownloadFromIMAP: Download a File from a IMAP Folder, and so on), any Python Callable can be a Component inside a Task, or can extends UserComponent to build your own componets.
Every designed Task can run from CLI, programmatically, via RESTful API (using our aioHTTP-based Handler), called by WebHooks or even dispatched to a external Worker using our built-in Scheduler.
Quickstart
pip install flowtask
Tasks can organizated into directory structure like this:
tasks / ├── programs / ├── test / ├── tasks /
The main reason of this structure, is maintain organized several tasks by tenant/program, avoiding filling a directory with several task files.
FlowTask support "TaskStorage", a Task Storage is the main repository for tasks, main Task Storage is a directory in any filesystem path (optionally you can syncronize that path using git), but Tasks can be saved onto a Database or a S3 bucket.
Dependencies
- aiohttp (Asyncio Web Framework and Server) (required by navigator)
- AsyncDB
- QuerySource
- Navigator-api
- (Optional) Qworker (for distributing asyncio Tasks on distributed workers).
Features
- Component-based Task execution framework with several components covering several actions (download files, create pandas dataframes from files, mapping dataframe columns to a json-dictionary, etc)
- Built-in API for execution of Tasks.
How I run a Task?
Can run a Task from CLI:
task --program=test --task=example
on CLI, you can pass an ENV (enviroment) to change the environment file on task execution.
ENV=dev task --program=test --task=example
or Programmatically:
from flowtask import Task
import asyncio
task = Task(program='test', task='example')
results = asyncio.run(task.run())
# we can alternatively, using the execution mode of task object:
results = asyncio.run(task())
Requirements
- Python >= 3.9
- asyncio (https://pypi.python.org/pypi/asyncio/)
- aiohttp >= 3.6.2
Contribution guidelines
Please have a look at the Contribution Guide
- Writing tests
- Code review
- Other guidelines
Who do I talk to?
- Repo owner or admin
- Other community or team contact
License
Navigator is licensed under Apache 2.0 License. See the LICENSE file for more details.
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 Distributions
Built Distributions
Hashes for flowtask-5.1.21-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dace4e747300731b7eefcb66da5ec19112ab3e40a3ff00b6a504f2d0da802406 |
|
MD5 | 8166ee1782a5ff144d26e915e3d32d9e |
|
BLAKE2b-256 | b6b4a729ad8d7053487eb2a8f525ac665b756df43f4f5259117aad6a1ed42d43 |
Hashes for flowtask-5.1.21-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22f7f6257b5684df18eb6a17c893c33f7fdf8dbdbf6e013b8b5f251367dbe27b |
|
MD5 | 6566185f4cd2fff61bda505c1a5e8f16 |
|
BLAKE2b-256 | ee026bdbf599d303192d6efe5cf8cac96715d373fa06d5e5cf8d5e203c3f0f8d |
Hashes for flowtask-5.1.21-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5592100b70bab7751466b59c5f4f228ab5fbeed6f712df93c4fe7f0d7c91bc7 |
|
MD5 | 83dda0dccbd1c0ac6dabcf11b0936824 |
|
BLAKE2b-256 | 1bf422a632116084c00b9a7545ee31e24d3656afe3c5ba3fa264a564504952fe |