Closed dsully closed 7 years ago
I actually have an example FlaskSQLService
class that I showed in https://github.com/dgilland/sqlservice/issues/3 which includes the late-binding approach for engine creation via the Flask extension proxy class.
It's not tested by me in any way so there may be bugs or edge cases that need to be addressed but that example should help you get started.
One day I may have enough time to formalize that example into a flask-sqlservice
extension proper but until then, feel free to use it directly.
Great, thanks!
Closing this for now. If you run into any other issues, feel free to re-open the issue or create a new one.
Hi Derek - do you have a guide on migrating from Flask-SQLAlchemy to using SQLService?
I'm trying to wrap my head around what needs to be done, how the standard pattern of delaying engine creation can/should be done. For example:
Obviously the app context wouldn't be needed any longer. But the delayed connection is quite useful to handle production vs unit test configuration of the database.