Download services/export/protocol.py from paisaly/backend: direct link, hf CLI and curl.
- Browser
- Download file 391 Bytes
-
https://huggingface.co/spaces/paisaly/backend/resolve/main/services/export/protocol.py
- Command line
-
hf download hf://spaces/paisaly/backend/services/export/protocol.py
-
curl -L -o protocol.py https://huggingface.co/spaces/paisaly/backend/resolve/main/services/export/protocol.py
391 Bytes
| """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: ... | |