semvec/pypi-packages huggingface dataset:
pyramid_mongo_session 0.1
MongoDB-based session factory for Pyramid framework
License: BSD
Keywords: pyramid mongodb mongo session factory

You can try https://pypi.python.org/pypi/mongodb-beaker2 which released in 2012... I couldn't, I gave up.


::

    # encoding: utf-8

    from pyramid.config import Configurator
    from pyramid_mongo_session import MongoSessionFactory
    ...

    def main(global_config, **settings):
        config = Configurator(settings=settings)

        session_factory = MongoSessionFactory(
            collection=MongoClient('localhost', 27017).your_db.session)
        config.set_session_factory(session_factory)
        ...
        return config.make_wsgi_app()


Documentation: https://github.com/tark-hidden/pyramid_mongo_session