A flexible and powerful data processing pipeline library
Project description
Overview
Pipeflow-lite is a flexible and powerful data processing pipeline framework designed to simplify the flow of data from sources to destinations such as databases, file systems, APIs, and more. It leverages a plugin-based architecture that allows users to easily extend functionality as needed while keeping the core logic simple and efficient.
Installation
Pipeflow-lite can be installed via Python's package management tool pip (assuming you have packaged the project as an installable Python package):
pip install pipeflow-lite
Alternatively, if you are developing locally, you can use the project's source code directly:
python setup.py develop
Quick Start
1. Configure the Environment
Ensure your Python environment has Pipeflow-lite and its dependencies installed.
2. Define Actions
Create your action files
from pipeflow.core.pipeflow_action import PipeflowAction
from types import MappingProxyType
from typing import Any
class AAction(PipeflowAction):
async def execute(self, params: MappingProxyType) -> Any:
# Implement your data processing logic
# Access and modify data in the context
pass
class BAction(PipeflowAction):
async def execute(self, params: MappingProxyType) -> Any:
# ...
pass
class CAction(PipeflowAction):
def upstream(self):
return [AAction, BAction]
async def execute(self, params: MappingProxyType) -> Any:
# ...
pass
# class D and E...
3. Define Context
Create your context file, e.g., one_context.py:
from pipeflow.core.pipeflow_context import PipeflowContext, load_from_directory
class OneContext(PipeflowContext):
def __init__(self):
# Load from path
# Relative to the project root path, or just use the absolute path
action_classes = load_from_directory("./example")
# # Or load by type
# from example.actions.a_action import AAction
# from example.actions.b_action import BAction
# from example.actions.c_action import CAction
# from example.actions.d_action import DAction
# from example.actions.e_action import EAction
# action_classes = [
# AAction,
# BAction,
# CAction,
# DAction,
# EAction
# ]
super().__init__(action_classes)
4. Run the Pipeline
Write code in example/main.py to create and run your pipeline:
from example.one_context import OneContext
# Create a context instance
pipeline = OneContext()
result = pipeline.execute(initial_params={"key1": "value1"})
5. Visualize the Flow
Use view.py to generate and view the flowchart of your action node sequences:
python view.py
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pipeflow_lite-1.0.0.tar.gz.
File metadata
- Download URL: pipeflow_lite-1.0.0.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8f55af1b412dfb26516ece602510c44c185911c7b3f4a8fd2a0f167e659c258
|
|
| MD5 |
f5793f3d98938e52cce50ea2c6149f06
|
|
| BLAKE2b-256 |
33899f3cf459a9adee2d595494f8f1778a47d91d32352df4f292a98f822b069f
|
File details
Details for the file pipeflow_lite-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pipeflow_lite-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f141048e7631d6ce075696a965ffc5c2ba311ab419b781c76f3f9aeba0f8aa79
|
|
| MD5 |
dda87df84fb51c368e606cd22842c6bf
|
|
| BLAKE2b-256 |
9f08c4d21ebaa97ed62e2841ce0235e9097cf35f8ab77da50de59871c521cff9
|