flask.Config.from_pyfile¶
-
Config.
from_pyfile
(filename, silent=False)[source]¶ Updates the values in the config from a Python file. This function behaves as if the file was imported as module with the
from_object()
function.Parameters: - filename – the filename of the config. This can either be an absolute filename or a filename relative to the root path.
- silent – set to
True
if you want silent failure for missing files.
New in version 0.7: silent parameter.