A microservices nanoframework.
Project description
🐎 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
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
rampante-0.0.5.tar.gz
(5.6 kB
view details)
Built Distribution
File details
Details for the file rampante-0.0.5.tar.gz
.
File metadata
- Download URL: rampante-0.0.5.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e9e4567cb02cce9cc8eceddaf39ab3fa70b87c0ce6c4920bcc6fceb049d21da |
|
MD5 | 4fb7d5860e1fa67730c1b67c3cac7cf4 |
|
BLAKE2b-256 | 9f853ef216e27db66f5832ca16b0047271e79f9a070806ee7b952b8e30d9ff0d |
File details
Details for the file rampante-0.0.5-py2.py3-none-any.whl
.
File metadata
- Download URL: rampante-0.0.5-py2.py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc4faa2910197ad72aeb8b7671787ad62e694b59316f0b873640c7f8486b0c31 |
|
MD5 | 5b0b5c5d8eb5a4a6c0e385d4b1bc7202 |
|
BLAKE2b-256 | 2a9206f591da8fae8a12f47a854246013d4b25a43eb4aeb0ecc0b94d73342738 |