faust.types.web

class faust.types.web.Request[source]
class faust.types.web.Response[source]
class faust.types.web.Web[source]
class faust.types.web.View[source]
faust.types.web.ViewHandlerMethod

alias of typing.Callable

faust.types.web.ViewDecorator

alias of typing.Callable

class faust.types.web.ResourceOptions(*args, **kwargs)[source]

CORS Options for specific route, or defaults.

allow_credentials

Alias for field number 0

expose_headers

Alias for field number 1

allow_headers

Alias for field number 2

max_age

Alias for field number 3

allow_methods

Alias for field number 4

class faust.types.web.CacheBackendT(app: faust.types.web._AppT, url: Union[yarl.URL, str] = 'memory://', **kwargs) → None[source]
coroutine delete(self, key: str) → None[source]
Return type:None
coroutine get(self, key: str) → Optional[bytes][source]
Return type:Optional[bytes]
coroutine set(self, key: str, value: bytes, timeout: float) → None[source]
Return type:None
class faust.types.web.CacheT(timeout: Union[datetime.timedelta, float, str] = None, key_prefix: str = None, backend: Union[Type[faust.types.web.CacheBackendT], str] = None, **kwargs) → None[source]
view(timeout: Union[datetime.timedelta, float, str] = None, key_prefix: str = None, **kwargs) → Callable[Callable, Callable][source]
Return type:Callable[[Callable], Callable]
class faust.types.web.BlueprintT(*args, **kwargs)[source]
cache(timeout: Union[datetime.timedelta, float, str] = None, key_prefix: str = None, backend: Union[Type[faust.types.web.CacheBackendT], str] = None) → faust.types.web.CacheT[source]
Return type:CacheT
route(uri: str, *, name: Optional[str] = None, base: Type[faust.types.web.View] = <class 'faust.types.web.View'>) → Callable[Union[Type[faust.types.web.View], Callable[[faust.types.web.View, faust.types.web.Request], Union[Coroutine[[Any, Any], faust.types.web.Response], Awaitable[faust.types.web.Response]]], Callable[[faust.types.web.View, faust.types.web.Request, Any, Any], Union[Coroutine[[Any, Any], faust.types.web.Response], Awaitable[faust.types.web.Response]]]], Union[Type[faust.types.web.View], Callable[[faust.types.web.View, faust.types.web.Request], Union[Coroutine[[Any, Any], faust.types.web.Response], Awaitable[faust.types.web.Response]]], Callable[[faust.types.web.View, faust.types.web.Request, Any, Any], Union[Coroutine[[Any, Any], faust.types.web.Response], Awaitable[faust.types.web.Response]]]]][source]
Return type:Callable[[Union[Type[View], Callable[[View, Request], Union[Coroutine[Any, Any, Response], Awaitable[Response]]], Callable[[View, Request, Any, Any], Union[Coroutine[Any, Any, Response], Awaitable[Response]]]]], Union[Type[View], Callable[[View, Request], Union[Coroutine[Any, Any, Response], Awaitable[Response]]], Callable[[View, Request, Any, Any], Union[Coroutine[Any, Any, Response], Awaitable[Response]]]]]
static(uri: str, file_or_directory: Union[str, pathlib.Path], *, name: Optional[str] = None) → None[source]
Return type:None
register(app: faust.types.web._AppT, *, url_prefix: Optional[str] = None) → None[source]

Register a virtual subclass of an ABC.

Returns the subclass, to allow usage as a class decorator.

Return type:None
init_webserver(web: faust.types.web.Web) → None[source]
Return type:None
on_webserver_init(web: faust.types.web.Web) → None[source]
Return type:None
faust.types.web.HttpClientT

alias of aiohttp.client.ClientSession