MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / configure

Method configure

lib/sqlalchemy/orm/scoping.py:227–242  ·  view source on GitHub ↗

reconfigure the :class:`.sessionmaker` used by this :class:`.scoped_session`. See :meth:`.sessionmaker.configure`.

(self, **kwargs: Any)

Source from the content-addressed store, hash-verified

225 return sess
226
227 def configure(self, **kwargs: Any) -> None:
228 """reconfigure the :class:`.sessionmaker` used by this
229 :class:`.scoped_session`.
230
231 See :meth:`.sessionmaker.configure`.
232
233 """
234
235 if self.registry.has():
236 warn(
237 "At least one scoped session is already present. "
238 " configure() can not affect sessions that have "
239 "already been created."
240 )
241
242 self.session_factory.configure(**kwargs)
243
244 def remove(self) -> None:
245 """Dispose of the current :class:`.Session`, if present.

Callers

nothing calls this directly

Calls 2

warnFunction · 0.85
hasMethod · 0.45

Tested by

no test coverage detected