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 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.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d409caa6ab55e35154e6127d94710f5de5cf17c82ef52722ca240af81443794 |
|
MD5 | 44dfc79558643659dcd679b6390fda96 |
|
BLAKE2b-256 | 56b3e4df9d41d302c10c5a4cbc8030834b7a30e1becbd4b9b12db7a5c156d0c8 |
Close
Hashes for jsm_transactional_ruler-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a004ae4c5b2c7a26656c8785b20c47b8b4477d45d9ffb07fc89cebcf45ee61e2 |
|
MD5 | 0e3db682486779c54c4343b7a7f0e2f0 |
|
BLAKE2b-256 | 76110b11558708157c518594403947c27e32cfbeb38daa030e3eb513169def41 |