websauna.system.model.interfaces module

interface websauna.system.model.interfaces.IModel[source]

Bases: zope.interface.Interface

Marker the class which declares SQLAlchemy model.

This marker interface is used e.g. by ModelAdmin for registry mappings between model and ModelAdmin. We cannot implicitly assume everything is inherited from .meta.Base because there could be plugin models and such.

interface websauna.system.model.interfaces.ISQLAlchemySessionFactory[source]

Bases: zope.interface.Interface

Provides way to hook in a custom SQLALchemy session creator.

Use cases include pooling, setting up different session logic for tests, etc.