server.web.db.deps

Attributes

DB

Functions

_session_scope(→ Generator[sqlalchemy.orm.Session, ...)

Context-manager that commits/rolls back and closes the Session.

get_db(→ Generator[sqlalchemy.orm.Session, None, None])

Yield a SQLAlchemy Session managed inside a context-manager.

Module Contents

server.web.db.deps._session_scope() Generator[sqlalchemy.orm.Session, None, None][source]

Context-manager that commits/rolls back and closes the Session.

server.web.db.deps.get_db() Generator[sqlalchemy.orm.Session, None, None][source]

Yield a SQLAlchemy Session managed inside a context-manager.

server.web.db.deps.DB: Callable[[sqlalchemy.orm.Session], sqlalchemy.orm.Session][source]