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 ? Coder avec une
Intelligence Artificielle
Voir le programme détaillé
Classe « SQLAlchemy »

Méthode flask_sqlalchemy.SQLAlchemy.init_app

Signature de la méthode init_app

def init_app(self, app: 'Flask') -> 'None' 

Description

help(SQLAlchemy.init_app)

Initialize a Flask application for use with this extension instance. This
must be called before accessing the database engine or session with the app.

This sets default configuration values, then configures the extension on the
application and creates the engines for each bind key. Therefore, this must be
called after the application has been configured. Changes to application config
after this call will not be reflected.

The following keys from ``app.config`` are used:

- :data:`.SQLALCHEMY_DATABASE_URI`
- :data:`.SQLALCHEMY_ENGINE_OPTIONS`
- :data:`.SQLALCHEMY_ECHO`
- :data:`.SQLALCHEMY_BINDS`
- :data:`.SQLALCHEMY_RECORD_QUERIES`
- :data:`.SQLALCHEMY_TRACK_MODIFICATIONS`

:param app: The Flask application to initialize.


Vous êtes un professionnel et vous avez besoin d'une formation ? Programmation Python
Les compléments
Voir le programme détaillé