/
senorodion
/
Piway
Обзор
Документация
Войти
/
senorodion
/
Piway
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
piway/protocols.py
22 строки
985 B
Rodion Glukhov
Упрощение архитектуры
05 июл 2026, 16:38
Верифицирован
05 июл 2026, 16:38
57daa8a
Код
Авторство
О чём код?
from typing import Protocol class StreamTransportProtocol(Protocol): async def send_bytes(self, data: bytes) -> None: ... async def send_str(self, data: str) -> None: ... class HTTPProtocol(Protocol): async def __call__(self) -> bytes: ... def __aiter__(self) -> bytes: ... async def client_disconnect(self) -> None: ... def response_empty(self, status: int, headers: list[tuple[str, str]]) -> None: ... def response_str(self, status: int, headers: list[tuple[str, str]], body: str) -> None: ... def response_bytes(self, status: int, headers: list[tuple[str, str]], body: bytes) -> None: ... def response_file(self, status: int, headers: list[tuple[str, str]], file: str) -> None: ... def response_file_range( self, status: int, headers: list[tuple[str, str]], file: str, start: int, end: int ) -> None: ... def response_stream( self, status: int, headers: list[tuple[str, str]] ) -> StreamTransportProtocol: ...