rampante 0.0.14

Last updated:

0 purchases

rampante 0.0.14 Image
rampante 0.0.14 Images
Add to Cart

Description:

rampante 0.0.14

🐎 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 3 params
# queue_name, for example could be "user.subscribed"
# data is a dictionary, it's a msgpacked message sent to NATS
# app, aiohttp app instance (in case)

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

@subscribe_on("user.subscribed", "user.created")
async def send_another_message(queue_name, data, app):
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 retry/logic when tasks fail

Pull requests are encouraged!


License
Apache 2.0

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.