Hi
I am looking for Pyramid add-ons development environment directory structure best practice.
To explain it better let's say started a Pyramid project using cookie cutter, it's repo name is main_package and selected sqlalchemy and jinja2 during the installation. now adding new directory named pyramid_new_addon beside the main_package repo to develop a new Pyramid addon to be included in main_package using config.include and def includeme(config). all is good until pyramid_new_addon needs to use a different database than main_package database.
Is it possible to connect to different database using the same session that has been instantiated in main_package ? if it is not possible, what is the best practice for having each of new addons having their own database ?
Kotti has done a great job in adding new addons to main configurtor including alembic directory, however not clear how it handles it if new addons using it's own database:
settings['pyramid.includes'] += ' kotti_addon'
settings['kotti.alembic_dirs'] += ' kotti_addon:alembic'
settings['kotti.available_types'] += ' kotti_addon.resources.CustomContent'
It would be nice to have a cookiecutter to create the pyramid_new_addon like what Kotti provides.
Thanks