simple way to build the declarative and distributed data pipelines with python. it supports rabbitmq or kafka as a broker
Project description
unipipeline
simple way to build the declarative and distributed data pipelines.
Why you should use it
- Declarative config
- Fully typed
- Multi-broker support
- kafka
- rabbitmq
- inmemory pubsub
How to Install
$ pip3 install unipipeline
Example
# dag.yml
brokers:
default_broker:
import_template: "some.module.broker:MyBroker"
messages:
first_message:
import_template: "some.module.first_message:FirstMessage"
second_message:
import_template: "some.module.second_message:SecondMessage"
workers:
__default__:
broker: default_broker
first_worker:
input_message: first_message
inport_template: "some.module.first_worker:FirstWorker"
second_worker:
input_message: second_message
import_template: "some.module.second_worker:SecondWorker"
# ./some/module/second_message.py
from unipipeline import UniMessage
class SecondMessage(UniMessage):
some_prop: bool
some_other_prop: str
# ./some/module/first_worker.py
from unipipeline import UniWorker
from some.module.second_message import SecondMessage
class MyWorker(UniWorker[SecondMessage]):
def handle_message(self, message: SecondMessage) -> None:
print("hello ", message.some_other_prop)
# main.py
from unipipeline import Uni
u = Uni("dag.yml")
u.check_load_all(create=True)
w = u.get_worker("name_of_worker")
w.send(
some_prop=True,
some_other_prop="World!"
)
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
unipipeline-1.2.5.tar.gz
(26.6 kB
view details)
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 unipipeline-1.2.5.tar.gz.
File metadata
- Download URL: unipipeline-1.2.5.tar.gz
- Upload date:
- Size: 26.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e830239249b8bdaa891ee64c3a035cda9a5b23903e3eab43da237b7081478cd9
|
|
| MD5 |
428cb3aeced64a89607853e4635a804e
|
|
| BLAKE2b-256 |
b1a1c51e3c02ffd832b39df96dbb5299ca2d3179734e9392adb989ba3f864544
|
File details
Details for the file unipipeline-1.2.5-py3-none-any.whl.
File metadata
- Download URL: unipipeline-1.2.5-py3-none-any.whl
- Upload date:
- Size: 40.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
496f716a6fd4f2b5e1594fe21dcb8c775fbe5d6985966eed38d0f2ad35c22a45
|
|
| MD5 |
76c22c79e28bc8413f35e06c5f704f9a
|
|
| BLAKE2b-256 |
4ba4e2ddd00622ddf0d226ad3522d205e93808db04cc677550b4fd6d3183bc03
|