faust.types.web
¶
- class faust.types.web.ResourceOptions(allow_credentials: bool = False, expose_headers: Optional[Union[str, Sequence[str]]] = (), allow_headers: Optional[Union[str, Sequence[str]]] = (), max_age: Optional[int] = None, allow_methods: Optional[Union[str, Sequence[str]]] = ())[source]¶
CORS Options for specific route, or defaults.
- faust.types.web.HttpClientT¶
alias of
ClientSession
- class faust.types.web.CacheBackendT(app: _AppT, url: Union[URL, str] = 'memory://', **kwargs: Any)[source]¶
- class faust.types.web.CacheT(timeout: Optional[Union[timedelta, float, str]] = None, key_prefix: Optional[str] = None, backend: Optional[Union[Type[CacheBackendT], str]] = None, **kwargs: Any)[source]¶
- class faust.types.web.BlueprintT[source]¶
-
- abstract cache(timeout: Optional[Union[timedelta, float, str]] = None, include_headers: bool = False, key_prefix: Optional[str] = None, backend: Optional[Union[Type[CacheBackendT], str]] = None) CacheT [source]¶
- Return type:
- abstract route(uri: str, *, name: ~typing.Optional[str] = None, base: ~typing.Type[~faust.types.web.View] = <class 'faust.types.web.View'>) 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]]]]] [source]¶
- Return type:
_CallableGenericAlias
[_UnionGenericAlias
[_GenericAlias
[View
],_CallableGenericAlias
[View
,Request
,_UnionGenericAlias
[_GenericAlias
[Any
,Any
,Response
],_GenericAlias
[Response
]]],_CallableGenericAlias
[View
,Request
,Any
,Any
,_UnionGenericAlias
[_GenericAlias
[Any
,Any
,Response
],_GenericAlias
[Response
]]]],_UnionGenericAlias
[_GenericAlias
[View
],_CallableGenericAlias
[View
,Request
,_UnionGenericAlias
[_GenericAlias
[Any
,Any
,Response
],_GenericAlias
[Response
]]],_CallableGenericAlias
[View
,Request
,Any
,Any
,_UnionGenericAlias
[_GenericAlias
[Any
,Any
,Response
],_GenericAlias
[Response
]]]]]
- abstract static(uri: str, file_or_directory: Union[str, Path], *, name: Optional[str] = None) None [source]¶
- Return type:
None