Open utterances-bot opened 3 years ago
nice, it's useful for me
This article encourages to use singleton objects (app and .resources) instead of factories with storing state on application, which is considered as bad design by many programmers, I think you should add disclaimer about that - some newbies may consider this as "best practice".
There is no way on writing reusable python module which will rely on .resources
or .settings
because of this, and there is no way to run several applications with different configurations in same context.
How about cache for database?
Structuring Starlette Projects
Starlette's modular design doesn't necessarily make it clear how Starlette projects should be structured. Here is a minimal yet flexible project structure that will prevent circular dependencies and help you write more readable Starlette application code.
https://florimond.dev/blog/articles/2020/05/structuring-starlette-projects/