Added docstrings

This commit is contained in:
Jonas Linter
2025-10-20 09:15:08 +02:00
parent 6f377b1ea1
commit 8e6049e210

View File

@@ -1,3 +1,5 @@
"""API endpoints for the form-data and the alpinebits server."""
import asyncio import asyncio
import gzip import gzip
import json import json
@@ -81,6 +83,8 @@ class LanguageDetectionResponse(BaseModel):
# --- Enhanced event dispatcher with hotel-specific routing --- # --- Enhanced event dispatcher with hotel-specific routing ---
class EventDispatcher: class EventDispatcher:
"""Simple event dispatcher for AlpineBits push requests."""
def __init__(self): def __init__(self):
self.listeners = defaultdict(list) self.listeners = defaultdict(list)
self.hotel_listeners = defaultdict(list) # hotel_code -> list of listeners self.hotel_listeners = defaultdict(list) # hotel_code -> list of listeners