-
-
Notifications
You must be signed in to change notification settings - Fork 16.8k
config option for "flask run" (e.g. --dotenv/-e) #3108
Description
Would it make sense to allow passing a --config/-c option to flask run, that would then be exposed to users somehow for subsequent passing to e.g. app.config.from_pyfile()?
(I'm imagining this done in a reusable way so that a "flask gunicorn" custom command (the likes of which I've already implemented) could accept and expose a -c value similarly, so that the app could be configured from this same provided path whether running in development or production.)
This would reduce the dependence on an environment variable to specify this. Reason I ask is that many of the Flask users I'm supporting are allergic to environment variables for the reasons mentioned in #3095, and have been missing some way to pass a CLI option to flask run to help configure their apps. Thanks 😊