__call__(self, environ: dict, start_response: Callable) -> Any |
The WSGI server calls the Flask application object as the [extrait de __call__.__doc__] |
add_template_filter(self, f: Callable[..., Any], name: Optional[str] = None) -> None |
Register a custom template filter. Works exactly like the [extrait de add_template_filter.__doc__] |
add_template_global(self, f: Callable[..., Any], name: Optional[str] = None) -> None |
Register a custom template global function. Works exactly like the [extrait de add_template_global.__doc__] |
add_template_test(self, f: Callable[..., bool], name: Optional[str] = None) -> None |
Register a custom template test. Works exactly like the [extrait de add_template_test.__doc__] |
add_url_rule(self, rule: str, endpoint: Optional[str] = None, view_func: Optional[Callable] = None, provide_automatic_options: Optional[bool] = None, **options: Any) -> None |
|
app_context(self) -> flask.ctx.AppContext |
Create an :class:`~flask.ctx.AppContext`. Use as a ``with`` [extrait de app_context.__doc__] |
async_to_sync(self, func: Callable[..., Coroutine]) -> Callable[..., Any] |
Return a sync function that will run the coroutine function. [extrait de async_to_sync.__doc__] |
auto_find_instance_path(self) -> str |
Tries to locate the instance path if it was not provided to the [extrait de auto_find_instance_path.__doc__] |
before_first_request(self, f: Callable[[], NoneType]) -> Callable[[], NoneType] |
Registers a function to be run before the first request to this [extrait de before_first_request.__doc__] |
create_global_jinja_loader(self) -> flask.templating.DispatchingJinjaLoader |
Creates the loader for the Jinja2 environment. Can be used to [extrait de create_global_jinja_loader.__doc__] |
create_jinja_environment(self) -> flask.templating.Environment |
Create the Jinja environment based on :attr:`jinja_options` [extrait de create_jinja_environment.__doc__] |
create_url_adapter(self, request: Optional[flask.wrappers.Request]) -> Optional[werkzeug.routing.MapAdapter] |
Creates a URL adapter for the given request. The URL adapter [extrait de create_url_adapter.__doc__] |
dispatch_request(self) -> Union[ForwardRef('Response'), ~AnyStr, Dict[str, Any], Generator[~AnyStr, NoneType, NoneType], Tuple[Union[ForwardRef('Response'), ~AnyStr, Dict[str, Any], Generator[~AnyStr, NoneType, NoneType]], Union[ForwardRef('Headers'), Dict[str, Union[str, List[str], Tuple[str, ...]]], List[Tuple[str, Union[str, List[str], Tuple[str, ...]]]]]], Tuple[Union[ForwardRef('Response'), ~AnyStr, Dict[str, Any], Generator[~AnyStr, NoneType, NoneType]], int], Tuple[Union[ForwardRef('Response'), ~AnyStr, Dict[str, Any], Generator[~AnyStr, NoneType, NoneType]], int, Union[ForwardRef('Headers'), Dict[str, Union[str, List[str], Tuple[str, ...]]], List[Tuple[str, Union[str, List[str], Tuple[str, ...]]]]]], ForwardRef('WSGIApplication')] |
Does the request dispatching. Matches the URL and returns the [extrait de dispatch_request.__doc__] |
do_teardown_appcontext(self, exc: Optional[BaseException] = <object object at 0x7f40e98e2d50>) -> None |
Called right before the application context is popped. [extrait de do_teardown_appcontext.__doc__] |
do_teardown_request(self, exc: Optional[BaseException] = <object object at 0x7f40e98e2d50>) -> None |
Called after the request is dispatched and the response is [extrait de do_teardown_request.__doc__] |
ensure_sync(self, func: Callable) -> Callable |
Ensure that the function is synchronous for WSGI workers. [extrait de ensure_sync.__doc__] |
finalize_request(self, rv: Union[ForwardRef('Response'), ~AnyStr, Dict[str, Any], Generator[~AnyStr, NoneType, NoneType], Tuple[Union[ForwardRef('Response'), ~AnyStr, Dict[str, Any], Generator[~AnyStr, NoneType, NoneType]], Union[ForwardRef('Headers'), Dict[str, Union[str, List[str], Tuple[str, ...]]], List[Tuple[str, Union[str, List[str], Tuple[str, ...]]]]]], Tuple[Union[ForwardRef('Response'), ~AnyStr, Dict[str, Any], Generator[~AnyStr, NoneType, NoneType]], int], Tuple[Union[ForwardRef('Response'), ~AnyStr, Dict[str, Any], Generator[~AnyStr, NoneType, NoneType]], int, Union[ForwardRef('Headers'), Dict[str, Union[str, List[str], Tuple[str, ...]]], List[Tuple[str, Union[str, List[str], Tuple[str, ...]]]]]], ForwardRef('WSGIApplication'), werkzeug.exceptions.HTTPException], from_error_handler: bool = False) -> flask.wrappers.Response |
Given the return value from a view function this finalizes [extrait de finalize_request.__doc__] |
full_dispatch_request(self) -> flask.wrappers.Response |
Dispatches the request and on top of that performs request [extrait de full_dispatch_request.__doc__] |
handle_exception(self, e: Exception) -> flask.wrappers.Response |
Handle an exception that did not have an error handler [extrait de handle_exception.__doc__] |
handle_http_exception(self, e: werkzeug.exceptions.HTTPException) -> Union[werkzeug.exceptions.HTTPException, ForwardRef('Response'), ~AnyStr, Dict[str, Any], Generator[~AnyStr, NoneType, NoneType], Tuple[Union[ForwardRef('Response'), ~AnyStr, Dict[str, Any], Generator[~AnyStr, NoneType, NoneType]], Union[ForwardRef('Headers'), Dict[str, Union[str, List[str], Tuple[str, ...]]], List[Tuple[str, Union[str, List[str], Tuple[str, ...]]]]]], Tuple[Union[ForwardRef('Response'), ~AnyStr, Dict[str, Any], Generator[~AnyStr, NoneType, NoneType]], int], Tuple[Union[ForwardRef('Response'), ~AnyStr, Dict[str, Any], Generator[~AnyStr, NoneType, NoneType]], int, Union[ForwardRef('Headers'), Dict[str, Union[str, List[str], Tuple[str, ...]]], List[Tuple[str, Union[str, List[str], Tuple[str, ...]]]]]], ForwardRef('WSGIApplication')] |
Handles an HTTP exception. By default this will invoke the [extrait de handle_http_exception.__doc__] |
handle_url_build_error(self, error: Exception, endpoint: str, values: dict) -> str |
Handle :class:`~werkzeug.routing.BuildError` on [extrait de handle_url_build_error.__doc__] |
handle_user_exception(self, e: Exception) -> Union[werkzeug.exceptions.HTTPException, ForwardRef('Response'), ~AnyStr, Dict[str, Any], Generator[~AnyStr, NoneType, NoneType], Tuple[Union[ForwardRef('Response'), ~AnyStr, Dict[str, Any], Generator[~AnyStr, NoneType, NoneType]], Union[ForwardRef('Headers'), Dict[str, Union[str, List[str], Tuple[str, ...]]], List[Tuple[str, Union[str, List[str], Tuple[str, ...]]]]]], Tuple[Union[ForwardRef('Response'), ~AnyStr, Dict[str, Any], Generator[~AnyStr, NoneType, NoneType]], int], Tuple[Union[ForwardRef('Response'), ~AnyStr, Dict[str, Any], Generator[~AnyStr, NoneType, NoneType]], int, Union[ForwardRef('Headers'), Dict[str, Union[str, List[str], Tuple[str, ...]]], List[Tuple[str, Union[str, List[str], Tuple[str, ...]]]]]], ForwardRef('WSGIApplication')] |
This method is called whenever an exception occurs that [extrait de handle_user_exception.__doc__] |
inject_url_defaults(self, endpoint: str, values: dict) -> None |
Injects the URL defaults for the given endpoint directly into [extrait de inject_url_defaults.__doc__] |
iter_blueprints(self) -> ValuesView[ForwardRef('Blueprint')] |
Iterates over all blueprints by the order they were registered. [extrait de iter_blueprints.__doc__] |
log_exception(self, exc_info: Union[Tuple[type, BaseException, traceback], Tuple[NoneType, NoneType, NoneType]]) -> None |
Logs an exception. This is called by :meth:`handle_exception` [extrait de log_exception.__doc__] |
make_config(self, instance_relative: bool = False) -> flask.config.Config |
Used to create the config attribute by the Flask constructor. [extrait de make_config.__doc__] |
make_default_options_response(self) -> flask.wrappers.Response |
This method is called to create the default ``OPTIONS`` response. [extrait de make_default_options_response.__doc__] |
make_response(self, rv: Union[ForwardRef('Response'), ~AnyStr, Dict[str, Any], Generator[~AnyStr, NoneType, NoneType], Tuple[Union[ForwardRef('Response'), ~AnyStr, Dict[str, Any], Generator[~AnyStr, NoneType, NoneType]], Union[ForwardRef('Headers'), Dict[str, Union[str, List[str], Tuple[str, ...]]], List[Tuple[str, Union[str, List[str], Tuple[str, ...]]]]]], Tuple[Union[ForwardRef('Response'), ~AnyStr, Dict[str, Any], Generator[~AnyStr, NoneType, NoneType]], int], Tuple[Union[ForwardRef('Response'), ~AnyStr, Dict[str, Any], Generator[~AnyStr, NoneType, NoneType]], int, Union[ForwardRef('Headers'), Dict[str, Union[str, List[str], Tuple[str, ...]]], List[Tuple[str, Union[str, List[str], Tuple[str, ...]]]]]], ForwardRef('WSGIApplication')]) -> flask.wrappers.Response |
Convert the return value from a view function to an instance of [extrait de make_response.__doc__] |
make_shell_context(self) -> dict |
Returns the shell context for an interactive shell for this [extrait de make_shell_context.__doc__] |
open_instance_resource(self, resource: str, mode: str = 'rb') -> IO[~AnyStr] |
Opens a resource from the application's instance folder [extrait de open_instance_resource.__doc__] |
preprocess_request(self) -> Union[ForwardRef('Response'), ~AnyStr, Dict[str, Any], Generator[~AnyStr, NoneType, NoneType], Tuple[Union[ForwardRef('Response'), ~AnyStr, Dict[str, Any], Generator[~AnyStr, NoneType, NoneType]], Union[ForwardRef('Headers'), Dict[str, Union[str, List[str], Tuple[str, ...]]], List[Tuple[str, Union[str, List[str], Tuple[str, ...]]]]]], Tuple[Union[ForwardRef('Response'), ~AnyStr, Dict[str, Any], Generator[~AnyStr, NoneType, NoneType]], int], Tuple[Union[ForwardRef('Response'), ~AnyStr, Dict[str, Any], Generator[~AnyStr, NoneType, NoneType]], int, Union[ForwardRef('Headers'), Dict[str, Union[str, List[str], Tuple[str, ...]]], List[Tuple[str, Union[str, List[str], Tuple[str, ...]]]]]], ForwardRef('WSGIApplication'), NoneType] |
Called before the request is dispatched. Calls [extrait de preprocess_request.__doc__] |
process_response(self, response: flask.wrappers.Response) -> flask.wrappers.Response |
Can be overridden in order to modify the response object [extrait de process_response.__doc__] |
raise_routing_exception(self, request: flask.wrappers.Request) -> 'te.NoReturn' |
Exceptions that are recording during routing are reraised with [extrait de raise_routing_exception.__doc__] |
register_blueprint(self, blueprint: 'Blueprint', **options: Any) -> None |
Register a :class:`~flask.Blueprint` on the application. Keyword [extrait de register_blueprint.__doc__] |
request_context(self, environ: dict) -> flask.ctx.RequestContext |
Create a :class:`~flask.ctx.RequestContext` representing a [extrait de request_context.__doc__] |
run(self, host: Optional[str] = None, port: Optional[int] = None, debug: Optional[bool] = None, load_dotenv: bool = True, **options: Any) -> None |
Runs the application on a local development server. [extrait de run.__doc__] |
select_jinja_autoescape(self, filename: str) -> bool |
Returns ``True`` if autoescaping should be active for the given [extrait de select_jinja_autoescape.__doc__] |
shell_context_processor(self, f: Callable) -> Callable |
Registers a shell context processor function. [extrait de shell_context_processor.__doc__] |
should_ignore_error(self, error: Optional[BaseException]) -> bool |
This is called to figure out if an error should be ignored [extrait de should_ignore_error.__doc__] |
teardown_appcontext(self, f: Callable[[Optional[BaseException]], NoneType]) -> Callable[[Optional[BaseException]], NoneType] |
Registers a function to be called when the application context [extrait de teardown_appcontext.__doc__] |
template_filter(self, name: Optional[str] = None) -> Callable[[Callable[..., Any]], Callable[..., Any]] |
A decorator that is used to register custom template filter. [extrait de template_filter.__doc__] |
template_global(self, name: Optional[str] = None) -> Callable[[Callable[..., Any]], Callable[..., Any]] |
A decorator that is used to register a custom template global function. [extrait de template_global.__doc__] |
template_test(self, name: Optional[str] = None) -> Callable[[Callable[..., bool]], Callable[..., bool]] |
A decorator that is used to register custom template test. [extrait de template_test.__doc__] |
test_cli_runner(self, **kwargs: Any) -> 'FlaskCliRunner' |
Create a CLI runner for testing CLI commands. [extrait de test_cli_runner.__doc__] |
test_client(self, use_cookies: bool = True, **kwargs: Any) -> 'FlaskClient' |
Creates a test client for this application. For information [extrait de test_client.__doc__] |
test_request_context(self, *args: Any, **kwargs: Any) -> flask.ctx.RequestContext |
Create a :class:`~flask.ctx.RequestContext` for a WSGI [extrait de test_request_context.__doc__] |
trap_http_exception(self, e: Exception) -> bool |
Checks if an HTTP exception should be trapped or not. By default [extrait de trap_http_exception.__doc__] |
try_trigger_before_first_request_functions(self) -> None |
Called before each request and will ensure that it triggers [extrait de try_trigger_before_first_request_functions.__doc__] |
update_template_context(self, context: dict) -> None |
Update the template context with some commonly used variables. [extrait de update_template_context.__doc__] |
wsgi_app(self, environ: dict, start_response: Callable) -> Any |
The actual WSGI application. This is not implemented in [extrait de wsgi_app.__doc__] |
Améliorations / Corrections
Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.
Emplacement :
Description des améliorations :