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.3.tar.gz
(5.0 kB
view details)
Built Distribution
File details
Details for the file rampante-0.0.3.tar.gz
.
File metadata
- Download URL: rampante-0.0.3.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82e0250d37e7f0060f682b37a53714677e2dadc948228f5a781dd279839fadf0 |
|
MD5 | 696b36c02371b352c3ae5fbbaeee4fbf |
|
BLAKE2b-256 | 131715e42331eef94e82d24c5a91b35b293f7a62d837bef9913d429b95060c5a |
File details
Details for the file rampante-0.0.3-py2.py3-none-any.whl
.
File metadata
- Download URL: rampante-0.0.3-py2.py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 660722d97c3c1e0dba121d9246520d927f67def1aed51a584207ef22528065cc |
|
MD5 | c500be015bf2f8c72bcfb8a1f060307e |
|
BLAKE2b-256 | baeb9f916d004534952f0786f4fb7679f08c7f078772cf7006261cc0678bae8a |