Skip to main content

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.

Implemented notifications are:

  1. Celery task
  2. 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 0.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 event-isc 0.1.0
File Size Uploaded Provenance Actions
event-isc-0.1.0.tar.gz 10.6 kB Without provenance Details for event-isc-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for event-isc 0.1.0
File Interpreter ABI Platform Actions
event_isc-0.1.0-py2.py3-none-any.whl Python 3, Python 2 none any Details for event_isc-0.1.0-py2.py3-none-any.whl

Total release size: 18.0 kB

Release files / event-isc-0.1.0.tar.gz

Download URL event-isc-0.1.0.tar.gz
Size 10.6 kB
Tags Source
SHA-256 checksum
How to use checksums
303e0049cf17946a93cc85846a1c4558237842425379dc13d4858b1ce323dafe
BLAKE2b-256 checksum
How to use checksums
fc31079b7cebb4eaac0434030cc52ccdc4b31c82d62d8ba01e81531f6b652bb6
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-0.1.0-py2.py3-none-any.whl

Download URL event_isc-0.1.0-py2.py3-none-any.whl
Size 7.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
10ddf7a3a1a8ff694a10645603582c01b8d00d6b381b1a80215b82f2b8dc4e5f
BLAKE2b-256 checksum
How to use checksums
499910fdabee607ad43f29e2235432a751363a54efff40c3170e3934470603d2
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 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.

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