bridge-events


Namebridge-events JSON
Version 1.0.2 PyPI version JSON
download
home_pageNone
SummaryPythonic adapter for Bridge events
upload_time2025-10-12 09:38:47
maintainerNone
docs_urlNone
authorNone
requires_python>=3.13
licenseNone
keywords bridge events webhooks
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">
  <img src="https://github.com/user-attachments/assets/933780a4-7e5c-4730-bd8b-6bfc83ead5f1" />
</div>

<div align="center">

![Version](https://img.shields.io/pypi/v/bridge-events?style=for-the-badge&colorA=4c566a&colorB=5382a1&logo=pypi&logoColor=white)
![Code Size](https://img.shields.io/github/languages/code-size/julienbenac/bridge-events?style=for-the-badge&colorA=4c566a&colorB=ebcb8b&logo=github&logoColor=white)
![License](https://img.shields.io/github/license/julienbenac/bridge-events?style=for-the-badge&colorA=4c566a&colorB=a3be8c)

</div>

`bridge-events` is a library designed to provide a flexible event emitter and server for integrating with [Bridge](https://www.bridgeapi.io). 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:

<details open>
  <summary><strong>📦 Using pip</strong></summary>

```bash
pip install bridge-events
```

</details>

<details>
  <summary><strong>🚀 Using pipx</strong></summary>

```bash
pipx install bridge-events
```

</details>

<details>
  <summary><strong>âš¡ Using uv</strong></summary>

```bash
uv add bridge-events
```

</details>

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.

```python
# 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}")
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "bridge-events",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.13",
    "maintainer_email": null,
    "keywords": "bridge, events, webhooks",
    "author": null,
    "author_email": "Julien Benac <contact@julienbenac.fr>",
    "download_url": "https://files.pythonhosted.org/packages/90/e8/0427ffc91c7c3e2d3d851f9842fd60c6dc84c11d695a3fac583ea7e7a7b4/bridge_events-1.0.2.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n  <img src=\"https://github.com/user-attachments/assets/933780a4-7e5c-4730-bd8b-6bfc83ead5f1\" />\n</div>\n\n<div align=\"center\">\n\n![Version](https://img.shields.io/pypi/v/bridge-events?style=for-the-badge&colorA=4c566a&colorB=5382a1&logo=pypi&logoColor=white)\n![Code Size](https://img.shields.io/github/languages/code-size/julienbenac/bridge-events?style=for-the-badge&colorA=4c566a&colorB=ebcb8b&logo=github&logoColor=white)\n![License](https://img.shields.io/github/license/julienbenac/bridge-events?style=for-the-badge&colorA=4c566a&colorB=a3be8c)\n\n</div>\n\n`bridge-events` is a library designed to provide a flexible event emitter and server for integrating with [Bridge](https://www.bridgeapi.io). It enables developers to build event-driven applications and services that can easily handle and emit custom events in real time.\n\n## Getting started\n\n### Installation\n\nTo begin using `bridge-events`, you first need to install the package. Select the installation method that best fits your workflow:\n\n<details open>\n  <summary><strong>\ud83d\udce6 Using pip</strong></summary>\n\n```bash\npip install bridge-events\n```\n\n</details>\n\n<details>\n  <summary><strong>\ud83d\ude80 Using pipx</strong></summary>\n\n```bash\npipx install bridge-events\n```\n\n</details>\n\n<details>\n  <summary><strong>\u26a1 Using uv</strong></summary>\n\n```bash\nuv add bridge-events\n```\n\n</details>\n\nOnce installed, you can import the event emitter into your Python project and start building event-driven logic.\n\n### Usage\n\nAfter 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.\n\n```python\n# main.py\n\nfrom bridge_events import EventEmitter\n\nemitter = EventEmitter(signature=\"secret\")\n\n@emitter.on(\"item.created\")\ndef handle_item_created(data):\n    print(f\"Received item created event: {data}\")\n\n@emitter.on(\"item.refreshed\")\ndef handle_item_refreshed(data):\n    print(f\"Received item refreshed event: {data}\")\n\n@emitter.on(\"payment.transaction.created\")\ndef handle_payment_transaction_created(data):\n    print(f\"Received payment transaction created event: {data}\")\n\n@emitter.on(\"payment.transaction.updated\")\ndef handle_payment_transaction_updated(data):\n    print(f\"Received payment transaction updated event: {data}\")\n\n@emitter.on(\"error\")\ndef handle_error(data):\n    print(f\"Received error event: {data}\")\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Pythonic adapter for Bridge events",
    "version": "1.0.2",
    "project_urls": {
        "Homepage": "https://github.com/julienbenac/bridge-events"
    },
    "split_keywords": [
        "bridge",
        " events",
        " webhooks"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "82d10a751c825f59c8f3ebdd188da0245499d91d55845c691a0242ad0f766b3c",
                "md5": "6e5518844b9cc23ffddf219c1cafca2b",
                "sha256": "3daedbd61b47c500aad1c409b7a933bbfb9839e361854607e3c7c8b598ecd5d0"
            },
            "downloads": -1,
            "filename": "bridge_events-1.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6e5518844b9cc23ffddf219c1cafca2b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.13",
            "size": 6244,
            "upload_time": "2025-10-12T09:38:45",
            "upload_time_iso_8601": "2025-10-12T09:38:45.377972Z",
            "url": "https://files.pythonhosted.org/packages/82/d1/0a751c825f59c8f3ebdd188da0245499d91d55845c691a0242ad0f766b3c/bridge_events-1.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "90e80427ffc91c7c3e2d3d851f9842fd60c6dc84c11d695a3fac583ea7e7a7b4",
                "md5": "2f58826e410ff3e40d58d5eb1ae06c55",
                "sha256": "2d9919ba0b0c5c99db323f0d7f6bdf4c8cf8330a5af519e1dc823df37dac76ed"
            },
            "downloads": -1,
            "filename": "bridge_events-1.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "2f58826e410ff3e40d58d5eb1ae06c55",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.13",
            "size": 16642,
            "upload_time": "2025-10-12T09:38:47",
            "upload_time_iso_8601": "2025-10-12T09:38:47.085134Z",
            "url": "https://files.pythonhosted.org/packages/90/e8/0427ffc91c7c3e2d3d851f9842fd60c6dc84c11d695a3fac583ea7e7a7b4/bridge_events-1.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-12 09:38:47",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "julienbenac",
    "github_project": "bridge-events",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "bridge-events"
}
        
Elapsed time: 0.77987s