def home():
    return 'You wanted {!r} directory'.format(app.config.get('some_setting'))
if __name__ == '__main__':
    app.config['some_setting'] = sys.argv[1]
app.run()
How can I make command line arguments visible to Flask routes?