diff options
Diffstat (limited to 'deckit/module.py')
| -rw-r--r-- | deckit/module.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/deckit/module.py b/deckit/module.py index 9680c58..dec2e04 100644 --- a/deckit/module.py +++ b/deckit/module.py @@ -38,6 +38,9 @@ class Module: # action -> (content type, max bytes): actions that take a raw body, # such as a voice clip, instead of a small JSON object. uploads: dict[str, tuple[str, int]] = field(default_factory=dict) + # key -> (bytes, content type) or None: images served at + # /api/<module>/image/<key>, such as a window's preview. + image: Callable[[str], tuple[bytes, str] | None] | None = None start: Callable[[], None] | None = None stop: Callable[[], None] | None = None |
