API Reference

This page provides auto-generated API documentation from docstrings and type stubs.

Note

For usage examples and conceptual guides, see:

event_engine Module

Top-level exports and backend selection.

Topic Classes

event_engine.capi.c_topic

Note

The pure Python fallback (event_engine.native.topic) provides the same API. See Native Python Fallback for details.

Event Classes

event_engine.capi.c_event

Note

The pure Python fallback (event_engine.native.event) provides the same API. See Native Python Fallback for details.

Engine Classes

event_engine.capi.c_engine

Note

The pure Python fallback (event_engine.native.engine) provides the same API. See Native Python Fallback for details.

event_engine.capi.c_engine_ex

Note

The C-backed engine (loop, dispatch and timers in C via evt_engine in c_engine.h / c_engine_gil.h). The process-wide default EVENT_ENGINE singleton is an instance of this class; downstream Cython modules can cimport its C pointer as C_EVENT_ENGINE (see Cython API Reference). The loop thread is pinned to the CPU selected by the EE_LOOP_CPU compile-time macro (default 0, -1 disables).

Top-Level Default Engine

event_engine.EVENT_ENGINE is the process-wide default engine singleton, backed by event_engine.capi.c_engine_ex.EventEngineEx when the Cython extension is available (falling back to the pure-Python engine).

Fallback Engine

event_engine.capi.fallback_engine

Type Stubs

The package includes complete type stubs (.pyi files) for the Cython modules:

  • event_engine/capi/c_topic.pyi

  • event_engine/capi/c_event.pyi

  • event_engine/capi/c_engine.pyi

  • event_engine/capi/c_engine_ex.pyi

These provide full type information for IDEs and type checkers like mypy.

Example mypy usage:

mypy my_app.py

All public APIs are fully typed.

See Also