Inter-service event communication
This library handles inter (micro)services communication in a decoupled way using the event/observer pattern.
The code raises an event when something happens and that event fires notifications to the registered listeners.
THIS IS A PYTHON 2.7 COMPATIBLE PACKAGE, FOR PYTHON 3 USE https://pypi.org/project/event-isc/
Implemented notifications are:
- Celery task
- HTTP request
YAML file configuration
Can be configured with a yaml file like this, passed as initialization argument or in environment variable EVENTISC_CONFIG
name_prefix: myapp.
listeners:
- kind: http
event_name: myapp.user_created
url: http://notification-service.mycompany.com/send-welcome/
requests_kwargs:
auth: ["myuser", "password"]
request_format: json
data:
user_id: "{event_data['user'].id}"
email: "{event_data['user'].email}"
- kind: celery
event_name_regex: myapp[.].*_created
queue: foo_service
task_name: foo_handle_created
task_kwargs:
event_name: {event_name}
event_data: {event_data}
Usage
import eventisc
...
eventisc.trigger("user_created", {"user": user}) # Should fire both listeners
eventisc.trigger("foo_created", {"foo": "bar"}) # Should fire only celery
Metadata
Release files for event-isc-py2 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| event-isc-py2-0.1.0.tar.gz | 9.8 kB | Without provenance | Details for event-isc-py2-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| event_isc_py2-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for event_isc_py2-0.1.0-py3-none-any.whl |
Total release size: 17.4 kB
Release files / event-isc-py2-0.1.0.tar.gz
| Download URL | event-isc-py2-0.1.0.tar.gz |
|---|---|
| Size | 9.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
624d712d35cf077129efdf31bc84e0fe5e295dc156fb08b4b06f46bcdd435e66
|
|
BLAKE2b-256 checksum How to use checksums |
9826a3500b4a7db9633a22e7c356737809b12cc3c76d1503f89dcb1c42d93bc8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.26.0 setuptools/57.0.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.9
|
Release files / event_isc_py2-0.1.0-py3-none-any.whl
| Download URL | event_isc_py2-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e6c3415020f2a6dc21f59ee352329e6f583943edb2cc4dfb0e322cfb83c95565
|
|
BLAKE2b-256 checksum How to use checksums |
07291a8a327ea0d0fd4ff7d3239e4feb44b34418a239f606c92c94cbf5408f20
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.26.0 setuptools/57.0.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.9
|
Security for event-isc-py2 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.