Skip to main content

An asynchronous message ingress system. evbus is an app-merge component for larger projects. Events are put on a broker queue. A listener watches the broker queue and propagates events to configured ingress queues.

INSTALLATION

Install from pypi

pip install pop-evbus

Install locally with testing libraries:

$ git clone git@gitlab.com:vmware/idem/evbus.git
$ pip install -e evbus -r evbus/requirements/test.in

Firing Events

There are two functions that will put an event into the broker queue; put and put_nowait The only difference between them is that put is asynchronous and put_nowait is synchronous. Both accept a routing_key, body, and profile.

routing_key

This option is forwarded to the ingress plugins’ publish functions. Some message queues take a routing_key option themselves, some need to open a channel on the message queue for the named routing_key. It’s up to the ingress plugins to implement this appropriately for the message queue they wrap.

body

The event body is serialized by the evbus broker when it is put on the broker Queue. The body can be any serializable object. The serializer can be configured by setting hub.serialize.PLUGIN to the name of the plugin that should be used.

profile

Configured profiles are formatted as follows:

provider:
  profile_name:
      profile_data:

The profile parameter for the broker put and put_nowait functions specifies which profile_name should be used for firing an event. If no profile is specified, the profiles called “default” will be used. There can be multiple providers with the same profile name, the event will be forwarded to all providers that have a matching profile name. A context (ctx) will be generated that will be sent to the appropriate ingress plugin’s publish function based on profile.

Full Example

Asynchronous put:

async def my_func(hub):
    await hub.evbus.broker.put(
        routing_key="channel", body={"message": "event content"}, profile="default"
    )

Synchronous put:

def my_func(hub):
    hub.evbus.broker.put_nowait(
        routing_key="channel", body={"message": "event content"}, profile="default"
    )

Metadata

Release files for pop-evbus 7.0.1

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

Source distribution (sdist)

Source distribution for pop-evbus 7.0.1
File Size Uploaded Provenance Actions
pop-evbus-7.0.1.tar.gz 12.2 kB Without provenance Details for pop-evbus-7.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pop-evbus 7.0.1
File Interpreter ABI Platform Actions
pop_evbus-7.0.1-py3-none-any.whl Python 3 none any Details for pop_evbus-7.0.1-py3-none-any.whl

Total release size: 24.8 kB

Release files / pop-evbus-7.0.1.tar.gz

Download URL pop-evbus-7.0.1.tar.gz
Size 12.2 kB
Tags Source
SHA-256 checksum
How to use checksums
967eefc2bc46df1480f89bf2083a32d93ecc6ed5e7378587a73bfeae786bd168
BLAKE2b-256 checksum
How to use checksums
f006ad0c597fea2bd94f1059647e7c5f012378bbb8d1bf40e3452243e13a591c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.9.6 readme-renderer/41.0 requests/2.31.0 requests-toolbelt/1.0.0 urllib3/2.0.5 tqdm/4.66.1 importlib-metadata/6.8.0 keyring/24.2.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.9.18

Release files / pop_evbus-7.0.1-py3-none-any.whl

Download URL pop_evbus-7.0.1-py3-none-any.whl
Size 12.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
17d7ae6080e2b5e392ae19e3fc42e6d7dd42c0e46a475d80878f7e5efe225fba
BLAKE2b-256 checksum
How to use checksums
6dbe8683478870185d991c9c0944d7746c44302dc94a86fcec9cd4023822e724
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.9.6 readme-renderer/41.0 requests/2.31.0 requests-toolbelt/1.0.0 urllib3/2.0.5 tqdm/4.66.1 importlib-metadata/6.8.0 keyring/24.2.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.9.18

Security for pop-evbus 7.0.1

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