starlette/starlette/types.py

12 lines
336 B
Python
Raw Normal View History

2018-06-26 08:39:06 +00:00
import typing
Scope = typing.Mapping[str, typing.Any]
Message = typing.Mapping[str, typing.Any]
Receive = typing.Callable[[], typing.Awaitable[Message]]
Send = typing.Callable[[Message], typing.Awaitable[None]]
ASGIInstance = typing.Callable[[Receive, Send], typing.Awaitable[None]]
ASGIApp = typing.Callable[[Scope], ASGIInstance]