Skip to content

Commit

Permalink
add blurb to SqlAlchemySessionInterface docstring about table managem…
Browse files Browse the repository at this point in the history
…ent options
  • Loading branch information
Lee Goolsbee committed Apr 30, 2024
1 parent beb9f34 commit 8a12243
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/flask_session/sqlalchemy/sqlalchemy.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ def __repr__(self):
class SqlAlchemySessionInterface(ServerSideSessionInterface):
"""Uses the Flask-SQLAlchemy from a flask app as session storage.
By default (``table_exists=False``) Flask-Session itself will create the table for session storage according to the
model defined by the ``create_session_model`` method. If ``table_exists`` is set to True, you're responsible—either
manually or via other tooling (e.g., Flask-Migrate)—for creating a table that matches the model, taking into account
the values (or defaults) provided via configuration parameters to the SQLAlchemy session interface (specifically
``SESSION_SQLALCHEMY_TABLE``, ``SESSION_SQLALCHEMY_SCHEMA``, ``SESSION_SQLALCHEMY_BIND_KEY``, and
``SESSION_SQLALCHEMY_SEQUENCE``).
:param app: A Flask app instance.
:param client: A Flask-SQLAlchemy instance.
:param key_prefix: A prefix that is added to all storage keys.
Expand Down

0 comments on commit 8a12243

Please sign in to comment.