Flask application factory with extensions geared towards JSON APIs