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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26a7c5d55db279eb098198ebd888588a2bd733714719088d9bd5bf5550f150ea |
|
MD5 | cb28e32ad13dd62b93dd5c5f20c7f5f6 |
|
BLAKE2b-256 | 8de97d3bc54b6bf2e83c1cd02b9d714bff35f4271ad6567482d207ecbeafe37d |
Close
Hashes for jsm_transactional_ruler-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d3cc959aa5b84374314e7e76e8868b05f8789ecb9f8389b216b62613e49dd49 |
|
MD5 | fb53f1acf09d885eff95ef4ab9d2d478 |
|
BLAKE2b-256 | 36279b79889ff176c370a255b1b5d4cf364c0dc3243a1197d6e99b4799acb187 |