'Obtain the :term:`session` object associated with this
request.  If a :term:`session factory` has not been registered
during application configuration, a
:class:`pyramid.exceptions.ConfigurationError` will be raised'

@reify
def session(self):

    factory = self.registry.queryUtility(ISessionFactory)
    if (factory is None):
        raise AttributeError('No    session    factory    registered    (see    the    Sessions    chapter    of    the    Pyramid    documentation)')
    return factory(self)
