Spaces:
Running

File size: 391 Bytes
25834e9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
"""ExportFormatter protocol — the contract every formatter must satisfy."""

from __future__ import annotations

from typing import Any

from typing_extensions import Protocol


class ExportFormatter(Protocol):
    """Minimal protocol every export formatter must satisfy."""

    mimetype: str
    filename: str

    def serialize(self, data: dict[str, Any]) -> bytes: ...