Lib to post user events on transactional topics
Project description
Transactional Ruler
Lib to post user events on transactional topics
Running tests and lint
docker-compose up integration-tests
docker-compose up lint
Installation
pip install jsm-transactional-ruler
Example Usage
from jsm_transactional_ruler.enums import EventType
from jsm_transactional_ruler.events import Event
from jsm_transactional_ruler.publisher import publish_event
event = Event(
user_id="fake_id", event_type=EventType.T_EVENT_REGISTERED_USER, data={"email": "teste@juntossomosmais.com.br"}
)
publish_event(event_trigger=event)
The attribute event_type
accepts only events registered in the EventType
enum.
The publish_event
method accepts the optional queue
and publisher_parameters
parameters to send to django-stomp:
event = Event(
user_id="fake_id", event_type=EventType.T_EVENT_REGISTERED_USER, data={"email": "teste@juntossomosmais.com.br"}
)
publish_event(event_trigger=event, queue="/topic/VirtualTopic.user-update-transactions", persistent=False)
How to upload lib to PyPI
It is necessary to update the lib version using the command below:
$ poetry version major|minor|patch
After generating the version:
- Create a new branch with the files updated by Poetry
- Open PR based on the
master
branch - Merge PR into the master
- Generate a new release based on the version. Document to generate release
- After generating the new release "Github Actions" will upload the lib to PyPI using Poetry.
- Good job!
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
Built Distribution
Close
Hashes for jsm-transactional-ruler-0.2.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f52615cd31c7488eedfbdd5d88c1dafd9a3c6061f0642303823de0b7b22e602 |
|
MD5 | 30a1dfd8076dbce15d17c762079d6744 |
|
BLAKE2b-256 | ed375760ecdfc9379154c559e746968fe477c9f0b35a8bc94dc67f52af32dbdd |
Close
Hashes for jsm_transactional_ruler-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d02a46834d52c01051c2932c8c2f7a37bfad45717f9d6ae4f089b96774af1dc8 |
|
MD5 | 99d17d56134a6f13c90e1630877f0482 |
|
BLAKE2b-256 | bb52f0c205054c80de6386a4277b166cd45cb6c3b7ca0ea785a9695219e17a4f |