Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up[doc] Please provide information about using database #376
Comments
|
I'm especially interested in setup, pooling and teardown of a database connection. My prefered example would be postgresql via psycopg2. |
|
It's very important. |
|
For what it is worth: I am using a global variable for my "raw" database connection with hug in
Both uses are still "experimental" and there are a number of drawbacks for using global variables, Note that #405 (hug.startup() is not called for cli applications). A good path forward would be to see how other falcon applications handle such resources that would need to be kept once per serving instance/task or once per process. |
|
Would anyone be interested in a tutorial on how to set up Hug with mongodb, Marshmallow, and pymongo? |
|
@FFX01 more examples are always good I believe, so thanks for offering to write a tutorial. Personally I have already outlined above what interests me most. (How to keep a resource like a psycopg2.pool |
|
Unfortunately, I do not have a solution for that use case. I don't know all that much about the psycopg2 internals. |
Can you please add information in the docs about how to use a database using for example SQLAlchemy or database raw?
Thanks