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.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74704920b3dfa313698612d52bf52a83464bc50ab234e5f15e434438f9d57764 |
|
MD5 | 6dcd4fd488228dc607b54de7efc0395d |
|
BLAKE2b-256 | 07ad1838f0a682f796e1061e5f66a6eaecac9c6732ed95fa9e88e000126fec83 |
Close
Hashes for jsm_transactional_ruler-0.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa9bf3f374a2f8c59b29d67ae7f21f56280d0a23a8c905171aca24cd88ac1f5c |
|
MD5 | dd3ce89550c5d7056d89d6d41d1dc432 |
|
BLAKE2b-256 | b46dd3cbfb6985937ef18a0b9930a6e70b9c29f7b265a61c1a16cc171a2c7942 |