Skip to main content

Version Code Size License

bridge-events is a library designed to provide a flexible event emitter and server for integrating with Bridge. It enables developers to build event-driven applications and services that can easily handle and emit custom events in real time.

Getting started

Installation

To begin using bridge-events, you first need to install the package. Select the installation method that best fits your workflow:

📦 Using pip
pip install bridge-events
🚀 Using pipx
pipx install bridge-events
⚡ Using uv
uv add bridge-events

Once installed, you can import the event emitter into your Python project and start building event-driven logic.

Usage

After installation, you can import the event emitter and create event handlers in your Python code. The following example demonstrates how to set up an event emitter, register handlers for specific events and respond to incoming data. This approach allows you to build applications that react to events in real time.

# main.py

from bridge_events import EventEmitter

emitter = EventEmitter(signature="secret")

@emitter.on("item.created")
def handle_item_created(data):
    print(f"Received item created event: {data}")

@emitter.on("item.refreshed")
def handle_item_refreshed(data):
    print(f"Received item refreshed event: {data}")

@emitter.on("payment.transaction.created")
def handle_payment_transaction_created(data):
    print(f"Received payment transaction created event: {data}")

@emitter.on("payment.transaction.updated")
def handle_payment_transaction_updated(data):
    print(f"Received payment transaction updated event: {data}")

@emitter.on("error")
def handle_error(data):
    print(f"Received error event: {data}")

Release files for bridge-events 1.0.2

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

Source distribution (sdist)

Source distribution for bridge-events 1.0.2
File Size Uploaded
bridge_events-1.0.2.tar.gz 16.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bridge-events 1.0.2
File Interpreter ABI Platform
bridge_events-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 22.9 kB

Release files / bridge_events-1.0.2.tar.gz

Download URL bridge_events-1.0.2.tar.gz
Size 16.6 kB
Tags Source
SHA-256 checksum
How to use checksums
2d9919ba0b0c5c99db323f0d7f6bdf4c8cf8330a5af519e1dc823df37dac76ed
BLAKE2b-256 checksum
How to use checksums
90e80427ffc91c7c3e2d3d851f9842fd60c6dc84c11d695a3fac583ea7e7a7b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.22

Release files / bridge_events-1.0.2-py3-none-any.whl

Download URL bridge_events-1.0.2-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3daedbd61b47c500aad1c409b7a933bbfb9839e361854607e3c7c8b598ecd5d0
BLAKE2b-256 checksum
How to use checksums
82d10a751c825f59c8f3ebdd188da0245499d91d55845c691a0242ad0f766b3c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.22

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

2 release files

1.0.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