Closed michaeltoohig closed 2 years ago
I'm no longer interested in this question I created. I've upgraded to SQLAlchemy 1.4 and no longer use encode/databases
.
In case anyone comes across this issue in the future, the code above has no reference to configure_mappers
, which is the most likely cause of "nothing ever happens and I feel like it is never being called".
I'm having trouble using FastAPI and FastAPI-CRUDRouter which is using this project https://github.com/encode/databases with SQLAlchemy.
I probably need to provide a mapper and/or session at start up but the few ways I've tried providing a session from
sessionmaker
is not doing it. Infact, wherever I place themake_versioned(user_cls=None)
nothing ever happens and I feel like it is never being called or failing silently, I'm not sure.For testing, I just took the example from FastAPI-CRUDRouter to test a minimal example but had no luck. Perhaps someone has done this already and knows what to do?
Here is the full example I was using to test which also includes the basic example from FastAPI-Users as I wanted to make a plugin like the FlaskPlugin.