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 :

Vous êtes un professionnel et vous avez besoin d'une formation ? RAG (Retrieval-Augmented Generation)
et Fine Tuning d'un LLM
Voir le programme détaillé
Classe « Config »

Méthode flask.Config.from_prefixed_env

Signature de la méthode from_prefixed_env

def from_prefixed_env(self, prefix: 'str' = 'FLASK', *, loads: 't.Callable[[str], t.Any]' = <function loads at 0x0000020DBA0FA0C0>) -> 'bool' 

Description

help(Config.from_prefixed_env)

Load any environment variables that start with ``FLASK_``,
dropping the prefix from the env key for the config key. Values
are passed through a loading function to attempt to convert them
to more specific types than strings.

Keys are loaded in :func:`sorted` order.

The default loading function attempts to parse values as any
valid JSON type, including dicts and lists.

Specific items in nested dicts can be set by separating the
keys with double underscores (``__``). If an intermediate key
doesn't exist, it will be initialized to an empty dict.

:param prefix: Load env vars that start with this prefix,
    separated with an underscore (``_``).
:param loads: Pass each string value to this function and use
    the returned value as the config value. If any error is
    raised it is ignored and the value remains a string. The
    default is :func:`json.loads`.

.. versionadded:: 2.1


Vous êtes un professionnel et vous avez besoin d'une formation ? Coder avec une
Intelligence Artificielle
Voir le programme détaillé