A lightweight pipeline framework
Project description
PipeLayer
PipeLayer is a event-driven pipeline framework. Define a series of steps, and chain them together to create modular applications.
Table of Contents
- Installation
- Getting Started
- The Framework
Complete documentation can be found here: greaterthan.solutions/pipelayer
Installation
From the command line:
pip install pipelayer
Getting Started
Step 1: Create The Filters
hello_world_filters.py
from pipelayer import Filter
class HelloFilter(Filter):
def run(self, data, context):
return "Hello"
class WorldFilter(Filter):
def run(self, data, context):
return f"{data}, World!"
functions.py
def create_message(data, context):
return {"message": data}
Step 2: Create The Pipeline
Create a module to run the pipeline:
app.py
import json
from pipelayer import Pipeline
from pipelayer.util import render_manifest
from functions import create_message
from hello_world_filters import HelloFilter, WorldFilter
if __name__ == "__main__":
hello_world_pipeline = Pipeline(
[
HelloFilter,
WorldFilter,
create_message,
lambda data, context: json.dumps(data),
]
)
output = hello_world_pipeline.run(None)
# output = '{"message": "Hello, World!"}'
print("\nPipeline Output:")
print(output)
print("\nManifest:")
print(render_manifest(hello_world_pipeline.manifest))
Step 3: Run the Pipeline
from the command line:
run app.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
pipelayer-0.7.0.tar.gz
(10.7 kB
view details)
Built Distribution
pipelayer-0.7.0-py3-none-any.whl
(12.2 kB
view details)
File details
Details for the file pipelayer-0.7.0.tar.gz
.
File metadata
- Download URL: pipelayer-0.7.0.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5018c553183cb91134b5d4a476d3346a3647454f4f6e5710e1eb9c8b5d21a5c7 |
|
MD5 | f0d9acf15fa61089930ce29064596d81 |
|
BLAKE2b-256 | 5fe0df0884603f473fec6060ff64763ef5e8977774ce6d98a810371de6cfa94e |
File details
Details for the file pipelayer-0.7.0-py3-none-any.whl
.
File metadata
- Download URL: pipelayer-0.7.0-py3-none-any.whl
- Upload date:
- Size: 12.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4449500573ea2ebdad74a19f32a1d32d5fe0fe0142cd92707a46ede76d9b92e9 |
|
MD5 | b1113e8cba0ff4202a0e523f31509d73 |
|
BLAKE2b-256 | e423849733e9f77037faa1814adec6dd4f53f3bfea4c68d5ca5c7c3cc65e12a3 |