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.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61c1c1966112a42efa40f34719d52755cee7bf5c1cbb40be2adb83ee04e790e6 |
|
MD5 | 24297e2a67ff4532290b53dc5e781ac2 |
|
BLAKE2b-256 | 7cd07d498b97cb5085ebc3de2cd50ed6ff87f1cb58a25088e137c9cd2469e9d6 |
Close
Hashes for jsm_transactional_ruler-0.2.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e7416de60f762b66f2b494b488db38bf4aca9092955cbc33a7d811353c50d2e |
|
MD5 | 6e8c5a99ae6162b78a927ecc134bf96b |
|
BLAKE2b-256 | 03458610cd612fdbd7d2aa55921d96b84e56dd441a948c4519ddb8f56d4553eb |