Let's make microservice development fun again!
Project description
Alem Mela
Overview
Asynchronous framework that makes it really simple to build RabbitMQ services.
Installation
pip install mela
Usage
Basic usage does look like this:
app.py
:
from mela import Mela
app = Mela(__name__)
app.read_config_yaml('application.yml')
@app.service("printer")
def printer(body, message):
# Just print message body and push
# unchanged message to output queue.
print(body)
return body
if __name__ == '__main__':
app.run()
application.yml
:
connections:
default:
host: localhost
port: 5672
username: user
password: bitnami
services:
printer:
consumer:
exchange: general-sentiment-x
routing_key: general-sentiment-q
queue: general-sentiment-q
publisher:
exchange: general-sentiment-x
routing_key: general-sentiment-q
For more use cases and examples please
check /examples
directory.
Authors
Developed in Alem Research.
Core maintainer: Daniyar Supiyev (undead.thunderbird@gmail.com).
Sponsor: Sergazy Narynov.
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
mela-1.0.10.tar.gz
(7.4 kB
view hashes)
Built Distribution
mela-1.0.10-py3-none-any.whl
(11.5 kB
view hashes)