How can I use an app-factory in Flask / WSGI servers and why might it be unsafe?
问题 A question on app callables, WSGI servers and Flask circular imports I am (possibly) confused. I want to safely create Flask / WSGI apps from app-factories and still be able to use them in WSGI servers easily. tl;dr Can I safely avoid creating an app on import of init (as recommended)and instead create it later (ie with a factory method) How do I make that app work neatly with a WSGI server? Especially when I am passing in the config and other settings not pulling them from ENV For example::