Skip to main content

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)

Versioning

This lib follows the pypi version format with the convention of using major.minor.patch version.

When to bump a patch version?

Bump the patch version if you are doing a quick fix, nothing that changes the library functionality.

When to bump the minor version?

Bump the minor version if you are adding new functionality without breaking backwards compatibility. For example, adding support to new events.

When to bump the major version?

Bump the major version if you are breaking backwards compatibility by adding new functionality or refactoring.

Contributing

This project uses a trunk based development flow, so that we have only one long-lived branch (master).

For any development, simply create a branch from it and follow the flow described below.

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!

Metadata

Release files for jsm-transactional-ruler 3.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jsm-transactional-ruler 3.1.0
File Size Uploaded
jsm_transactional_ruler-3.1.0.tar.gz 4.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for jsm-transactional-ruler 3.1.0
File Interpreter ABI Platform
jsm_transactional_ruler-3.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.0 kB

Release files / jsm_transactional_ruler-3.1.0.tar.gz

Download URL jsm_transactional_ruler-3.1.0.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c68b8edf0eb386f2012d47b7c44f4a45b69072acb6da5747a242dff2c03bf28c
BLAKE2b-256 checksum
How to use checksums
65bab24b20ef5f40f6e20cba440d7cc4653f8dca09cc716fe724ca4319df96c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.3.2 CPython/3.12.13 Linux/6.17.0-1008-azure

Release files / jsm_transactional_ruler-3.1.0-py3-none-any.whl

Download URL jsm_transactional_ruler-3.1.0-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
815ddad116ceaadf61f05e8d279ba263f2f1cde619cf70c66df81feaa858d28b
BLAKE2b-256 checksum
How to use checksums
ce95a2c0943cc253978df508c1a41bdc813e9a550657786b1afcb1afbcf99a71
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.3.2 CPython/3.12.13 Linux/6.17.0-1008-azure

Release history Release notifications | RSS feed

This release

3.1.0 This release

2 release files

3.0.0

2 release files

2.12.0

2 release files

2.11.0

2 release files

2.10.1

2 release files

2.9.1

2 release files

2.8.1

2 release files

2.8.0

2 release files

2.7.0

2 release files

2.6.0

2 release files

2.5.0

2 release files

2.4.0

2 release files

2.3.1

2 release files

2.3.0

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page