Participer au site avec un Tip
Rechercher
 

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 :

Contenu du module « flask »

Liste des classes du module flask

Nom de la classe Description
Blueprint Represents a blueprint, a collection of routes and other [extrait de Blueprint.__doc__]
Config Works exactly like a dict but provides ways to fill it from files [extrait de Config.__doc__]
Flask The flask object implements a WSGI application and acts as the central [extrait de Flask.__doc__]
Markup A string that is ready to be safely inserted into an HTML or XML [extrait de Markup.__doc__]
Request The request object used by default in Flask. Remembers the [extrait de Request.__doc__]
Response The response object that is used by default in Flask. Works like the [extrait de Response.__doc__]

Liste des fonctions du module flask

Signature de la fonction Description
abort(status: Union[int, ForwardRef('Response')], *args: Any, **kwargs: Any) -> 'te.NoReturn' Raises an :py:exc:`HTTPException` for the given status code or WSGI [extrait de abort.__doc__]
after_this_request(f: Callable[[ForwardRef('Response')], ForwardRef('Response')]) -> Callable[[ForwardRef('Response')], ForwardRef('Response')] Executes a function after this request. This is useful to modify [extrait de after_this_request.__doc__]
copy_current_request_context(f: Callable) -> Callable A helper function that decorates a function to retain the current [extrait de copy_current_request_context.__doc__]
escape Replace the characters ``&``, ``<``, ``>``, ``'``, and ``"`` in the string with HTML-safe sequences. Use this if you need to display text that might contain such characters in HTML. [extrait de escape.__doc__]
flash(message: str, category: str = 'message') -> None Flashes a message to the next request. In order to remove the [extrait de flash.__doc__]
get_flashed_messages(with_categories: bool = False, category_filter: Iterable[str] = ()) -> Union[List[str], List[Tuple[str, str]]] Pulls all flashed messages from the session and returns them. [extrait de get_flashed_messages.__doc__]
get_template_attribute(template_name: str, attribute: str) -> Any Loads a macro (or variable) a template exports. This can be used to [extrait de get_template_attribute.__doc__]
has_app_context() -> bool Works like :func:`has_request_context` but for the application [extrait de has_app_context.__doc__]
has_request_context() -> bool If you have code that wants to test if a request context is there or [extrait de has_request_context.__doc__]
jsonify(*args: Any, **kwargs: Any) -> 'Response' Serialize data to JSON and wrap it in a :class:`~flask.Response` [extrait de jsonify.__doc__]
make_response(*args: Any) -> 'Response' Sometimes it is necessary to set additional headers in a view. Because [extrait de make_response.__doc__]
redirect(location: str, code: int = 302, Response: Optional[Type[ForwardRef('Response')]] = None) -> 'Response' Returns a response object (a WSGI application) that, if called, [extrait de redirect.__doc__]
render_template(template_name_or_list: Union[str, List[str]], **context: Any) -> str Renders a template from the template folder with the given [extrait de render_template.__doc__]
render_template_string(source: str, **context: Any) -> str Renders a template from the given template source string [extrait de render_template_string.__doc__]
safe_join(directory: str, *pathnames: str) -> str Safely join zero or more untrusted path components to a base [extrait de safe_join.__doc__]
send_file(path_or_file: Union[os.PathLike, str, BinaryIO], mimetype: Optional[str] = None, as_attachment: bool = False, download_name: Optional[str] = None, attachment_filename: Optional[str] = None, conditional: bool = True, etag: Union[bool, str] = True, add_etags: Optional[bool] = None, last_modified: Union[datetime.datetime, int, float, NoneType] = None, max_age: Union[int, Callable[[Optional[str]], Optional[int]], NoneType] = None, cache_timeout: Optional[int] = None) Send the contents of a file to the client. [extrait de send_file.__doc__]
send_from_directory(directory: Union[os.PathLike, str], path: Union[os.PathLike, str], filename: Optional[str] = None, **kwargs: Any) -> 'Response' Send a file from within a directory using :func:`send_file`. [extrait de send_from_directory.__doc__]
stream_with_context(generator_or_function: Union[Iterator[~AnyStr], Callable[..., Iterator[~AnyStr]]]) -> Iterator[~AnyStr] Request contexts disappear when the response is started on the server. [extrait de stream_with_context.__doc__]
url_for(endpoint: str, **values: Any) -> str Generates a URL to the given endpoint with the method provided. [extrait de url_for.__doc__]

Liste des variables globales du module flask

Nom de la variable globale Valeur
appcontext_popped <flask.signals._FakeSignal object at 0x7f40cbef0250>
appcontext_pushed <flask.signals._FakeSignal object at 0x7f40cbef01f0>
appcontext_tearing_down <flask.signals._FakeSignal object at 0x7f40cbef0190>
before_render_template <flask.signals._FakeSignal object at 0x7f40cc0cff70>
current_app
g
got_request_exception <flask.signals._FakeSignal object at 0x7f40cbef0130>
message_flashed <flask.signals._FakeSignal object at 0x7f40cbef02b0>
request
request_finished <flask.signals._FakeSignal object at 0x7f40cbef00a0>
request_started <flask.signals._FakeSignal object at 0x7f40cc0cffd0>
request_tearing_down <flask.signals._FakeSignal object at 0x7f40cbef0040>
session
signals_available False
template_rendered <flask.signals._FakeSignal object at 0x7f40cc0cff10>