escapy.messages
Message providers that map game events to human-readable strings.
- type escapy.messages.MessageProvider = Callable[[Event], str | None]
A callable that returns a display string for an event, or
None.
- escapy.messages.dict_message_provider(messages)[source]
Create a
MessageProviderbacked by a dictionary.Event instances are looked up by their
repr()string. If no matching entry exists,Noneis returned.- Parameters:
messages (dict[str, str]) – Mapping from
repr(event)strings to message text.- Returns:
A
MessageProvidercallable.- Return type: