Skip to main content

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


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.1.0a2.tar.gz (13.0 kB view hashes)

Uploaded Source

Built Distribution

mela-1.1.0a2-py3-none-any.whl (24.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page