Contents
Since version 0.10, SeSQL can be used with other ORM than Django, for example SQLAlchemy. Not all features are supported, and this considered beta status.
The SQLAlchemy version is designed to work with different databases for core data and SeSQL data. It can be two PostgreSQL database, or PostgreSQL for SeSQL and something else (was tested with Sqlite and MySQL) for the core data.
To use SQLAlchemy with SeSQL you need to do three things :
# # Select the ORM to use # from sesql.orm.alchemy import AlchemyOrmAdapter orm = AlchemyOrmAdapter()
2. Bind your AlchemyOrmAdapter with your program bootstrap code (to have it access its database, your sessionmaker for "normal data", and to create SeSQL tables if required), with something like :
Session = sessionmaker(bind=engine) sesql_config.orm.bind('postgresql:///sesql', Session) sesql_config.orm.sync_db()