Skip to content

Latest commit

 

History

History
55 lines (33 loc) · 900 Bytes

index.rst

File metadata and controls

55 lines (33 loc) · 900 Bytes

Welcome to eventipy's documentation!

In-memory python event library.

Current version is |version|.

Library installation

$ pip install eventipy

Getting Started

Publishing an event:

import asyncio
from eventipy import events, Event

event = Event(topic="my-topic")
asyncio.run(events.publish(event))

Subscribing to a topic:

from eventipy import events

@events.subscribe("my-topic")
async def event_handler(event: Event):
    print(event.id)
    print(event.topic)

Dependencies

  • dataclasses (for python 3.6 compatability)

Table Of Contents

.. toctree::
   :maxdepth: 2

    Publishing events <publishing>
    Subscribing to topics <subscribing>
    Reference <reference>