The ConnectionHub class is accessible via the sqlobject.dbconnection module.
You must hang onto the original ConnectionHub instance, as you cannot retrieve it again from the class or instance.
To use the hub, do something like:
hub = ConnectionHub() class MyClass(SQLObject): _connection = hub hub.threadConnection = connectionFromURI('...')
Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
This routine can be used to run a function in a transaction, rolling the transaction back if any exception is raised from that function, and committing otherwise.
Use like:
sqlhub.doInTransaction(process_request, os.environ)
This will run process_request(os.environ). The return value will be preserved.
See the source for more information.