{"id":45891,"library":"pymitter","title":"pymitter","description":"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.","status":"active","version":"1.1.3","language":"python","source_language":"en","source_url":"https://github.com/riga/pymitter.git","tags":["events","event-emitter","wildcards","namespaces","nodejs"],"install":[{"cmd":"pip install pymitter","lang":"bash","label":"pip install"}],"dependencies":[],"imports":[],"quickstart":{"code":"from pymitter import EventEmitter\n\nee = EventEmitter()\n\n@ee.on('myEvent')\ndef handler1(arg1, arg2):\n    print(f\"handler1: {arg1} {arg2}\")\n\nee.emit('myEvent', 'arg1', 'arg2')\n# Output: handler1: arg1 arg2\n","lang":"python","description":"Basic usage: create an EventEmitter, register a handler, and emit an event."},"warnings":[{"fix":"Use '*' for single-level wildcard and '**' for multi-level in event names.","message":"The library uses a wildcard system: '*' matches any single level, '**' matches multiple levels. This is different from many other event libraries.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use `ee.on(event, handler, priority=True)` instead of `prependListener`.","message":"The `prependListener` and `prependOnceListener` methods are deprecated in favor of `on` and `once` with parameter `priority`. Check documentation.","severity":"deprecated","affected_versions":"<=1.1.3"},{"fix":"Use `from pymitter import EventEmitter` and `@ee.on()` decorator pattern.","message":"Versions 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.","severity":"breaking","affected_versions":"<1.0.0"}],"env_vars":null,"search_vec":"'1.1.3':19 '2':9 '3.9':22 'approach':10 'cadenc':36 'current':16 'emitt':26,40 'event':25,31,37,39 'event-emitt':38 'eventemitt':8 'extend':6 'low':34 'namespac':12,30,42 'node.js':7 'nodej':43 'port':3 'provid':11,23 'pymitt':1 'python':2,21 'releas':35 'requir':20 'support':28 'ttl':15 'version':18 'wildcard':13,33,41","created_at":"2026-06-07T12:57:14.355491+00:00","updated_at":"2026-06-07T12:57:14.355491+00:00","problems":[{"fix":"Use `from pymitter import EventEmitter`.","cause":"Importing incorrectly: `import pymitter` then `pymitter.EventEmitter` fails if the module doesn't expose the class directly.","error":"AttributeError: module 'pymitter' has no attribute 'EventEmitter'"},{"fix":"Use `@ee.on('event')` as a decorator, or call `ee.on('event', handler)` without parentheses after `on`.","cause":"Trying to call the handler object returned by `ee.on()` as a function instead of using it as a decorator.","error":"TypeError: 'EventHandler' object is not callable"},{"fix":"Ensure wildcards are used only when wildcard mode is enabled (default). If disabled, re-enable with `EventEmitter(wildcard=True)`.","cause":"Using wildcards in event names without proper escaping or when wildcard support is disabled.","error":"ValueError: wildcard not allowed in namespace"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/riga/pymitter.git","github":"https://github.com/riga/pymitter.git","docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}