Registry / devops / pymitter

pymitter

JSON →
library1.1.3pypypiunverified

Python port of the extended Node.js EventEmitter 2 approach providing namespaces, wildcards, and TTL. Currently at version 1.1.3, requires Python >=3.9. Provides an event emitter with support for namespaced events and wildcards. Low release cadence.

pip install pymitter
INSTALL
IMPORT
SIG · PYMITTER
P
pymitter
devopspythonv1.1.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Basic usage: create an EventEmitter, register a handler, and emit an event.

from pymitter import EventEmitter ee = EventEmitter() @ee.on('myEvent') def handler1(arg1, arg2): print(f"handler1: {arg1} {arg2}") ee.emit('myEvent', 'arg1', 'arg2') # Output: handler1: arg1 arg2
Debug
Known issues
gotchaThe library uses a wildcard system: '*' matches any single level, '**' matches multiple levels. This is different from many other event libraries.
fix
Use '*' for single-level wildcard and '**' for multi-level in event names.
affects: >=1.0.0
deprecatedThe `prependListener` and `prependOnceListener` methods are deprecated in favor of `on` and `once` with parameter `priority`. Check documentation.
fix
Use `ee.on(event, handler, priority=True)` instead of `prependListener`.
affects: <=1.1.3
breakingVersions prior to 1.0.0 had a different API. The new version uses EventEmitter class and decorators. Old code using `pymitter.EventEmitter()` directly will break if imported incorrectly.
fix
Use `from pymitter import EventEmitter` and `@ee.on()` decorator pattern.
affects: <1.0.0
Errors
Common errors & fixes
AttributeError: module 'pymitter' has no attribute 'EventEmitter'
Importing incorrectly: `import pymitter` then `pymitter.EventEmitter` fails if the module doesn't expose the class directly.
fix
Use `from pymitter import EventEmitter`.
TypeError: 'EventHandler' object is not callable
Trying to call the handler object returned by `ee.on()` as a function instead of using it as a decorator.
fix
Use `@ee.on('event')` as a decorator, or call `ee.on('event', handler)` without parentheses after `on`.
ValueError: wildcard not allowed in namespace
Using wildcards in event names without proper escaping or when wildcard support is disabled.
fix
Ensure wildcards are used only when wildcard mode is enabled (default). If disabled, re-enable with `EventEmitter(wildcard=True)`.
Upgrade
Version history
1.1.3latest on PyPI · released Jul 11, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
pymitter — pip install pymitter · libregistry