Skip to main content

A microservices nanoframework.

Project description

PyPI version Python Versions https://travis-ci.org/barrachri/rampante.svg?branch=master https://codecov.io/gh/barrachri/rampante/branch/master/graph/badge.svg

🐎 Rampante

A fancy and opinionated nanoframework for microservices.

Installation

pip install rampante

How to use subscribe_on

from rampante import subscribe_on

# The function should accept 2 params
# queue_name, for example could be "user.subscribed"
# data is a dictionary, it's a msgpacked message sent to Kafka

@subscribe_on("user.subscribed")
async def send_a_message(queue_name, data):
    log.info("Event received!")

@subscribe_on("user.subscribed", "user.created")
async def send_another_message(queue_name, data):
    log.info("Event received!")

Example

Check the examples inside the folder!

You need a nats-streaming:0.6.0 running, check the Makefile :)

The name

Rampante means “rampant” in Italian.

Why NATS?

It’s written in Go and seems working really well!

To Do

  • add circuit breaker

  • add retry

  • add logic when tasks fail

Pull requests are encouraged!

License

Apache 2.0

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

rampante-0.0.4.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

rampante-0.0.4-py2.py3-none-any.whl (3.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file rampante-0.0.4.tar.gz.

File metadata

  • Download URL: rampante-0.0.4.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for rampante-0.0.4.tar.gz
Algorithm Hash digest
SHA256 28038fe3957c53b83579811999041ef7f769fe92836492cb722037c99018dac9
MD5 51893bd94df4e82bdbf44189804f5bdf
BLAKE2b-256 f5416313147848bb6c88e94c5cb0d7f82a5f3a077bc99f7a80c2556315c86c44

See more details on using hashes here.

File details

Details for the file rampante-0.0.4-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for rampante-0.0.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a62ee180a90434e07b4f5335f89db372a934f877cdd52a03d75ec4c8fe5e4c00
MD5 8f61426a3f623c4ec685a8443bb91053
BLAKE2b-256 247c872034ee26b51eeb666b16142efa8b273bc21056ed98ac0408b2d310945c

See more details on using hashes here.

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