In Flask, the app configuration system only picks up keys that are in uppercase, so any lowercase settings from your config file get ignored. That's why you're seeing "MY_VARIABLE" but not "my_variable".
Change your config file so that all the setting names are uppercase, like MY_VARIABLE. (or) Or, if you need to keep lowercase names, you can load the file yourself and manually add each setting to app.config in uppercase form.