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.1.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04b02548a537fa57e7f79ab2c8e398e92d8f41352523ff0b99b28c5ef25a5654 |
|
MD5 | 0904b15d4d1b535ae75b8d954169271c |
|
BLAKE2b-256 | ef5563e3d4ccb269e871b92e51d95664f918fa08960cadc3551c9a31cc7d2bba |
Close
Hashes for jsm_transactional_ruler-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e448c5d053fda6a42d86778eb43d39c706dbe90cc2f293d7e4755529cc79cd1a |
|
MD5 | 46e81fda55a30b4180e521499ccc8f54 |
|
BLAKE2b-256 | a12039dd67c53f4bc698489dcd9168342f5c1d38e0a2b6614134d88f262ba225 |