{ "info": { "author": "Arnaud Seilles", "author_email": "arnaud.seilles@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "flask-config-override\n=====================\n\n[![Build Status](https://travis-ci.org/elboby/flask-config-override.png?branch=master)](https://travis-ci.org/elboby/flask-config-override)\n\nThis extension allows to change the configuration of a Flask application at runtime. This behavior is controlled by cookie and therefore is contained to the session of an unique user; configuration changes are not affecting other users.\n\nA common usage is to quickly change options in staging environment without having to redeploy configuration changes. For example, we use it for an external API location or a feature switch like using minified Javascript files or not.\n\nThe configuration options able to be overridden are limited and configurable as well (using CONFIG_OVERRIDE_EXTENDABLE_VARS). This option can NOT be overridden for security reason.\n\nThe idea is to replace the configuration object of a Flask application by a proxy object, whom behavior can be controlled/changed upon request while exposing the same interface as a Flask configuration. The extension also provide a blueprint (default base url to /config_override/) to control the cookie via some simple HTTP calls; this is automatically attached to the application.\n\nInstallation\n============\nVia Pypi:\n\n pip install flask-config-override\n\nUsage\n=====\nOnce installed, first attach the extension to your Flask application:\n\n from flask import Flask\n from flask.ext.config_override import ConfigOverride\n\n app = Flask(__name__)\n app.config['FOO'] = 'bar'\n\n # Enable the override for the DEBUG option (default to false)\n app.config['CONFIG_OVERRIDE_EXTENDABLE_VARS'] = ['FOO']\n config_override = ConfigOverride(app)\n\n # configure your routes and what not...\n\nLaunch your app, then open your browser and go to this url to setup the FOO option to another value; here \"toto\":\n\n http://localhost:5000/config_override/update/FOO/toto/\n\nYour session will now run with the settings FOO set to the new value. You can access it normally from `app.config['FOO']` within the context of a request.\n\nTo see the current changes, you can visit this url:\n\n http://localhost:5000/config_override/\n\nAnd to remove the changes, you just need to clear your cookie or go there:\n\n http://localhost:5000/config_override/reset/\n\n\nTests\n=====\n* First install `nose` for test discovery: `pip install nose`\n* Then run the tests within a virtual environment: `nosetests`\n\n\nContact\n=======\nFeel free to post issues, pull requests in github or contact me directly on twitter @el_boby.\n\n\nImmediate TODOs\n===============\n* test for cookie_utils\n* test for proxy_config (based on flask one)\n* documentation API (sphinx)\n\n\nTODO\n====\n* Override by Environment variables.\n* Flask Debug Toolbar integration.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/elboby/flask-config-override", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "Flask-Config-Override", "package_url": "https://pypi.org/project/Flask-Config-Override/", "platform": "any", "project_url": "https://pypi.org/project/Flask-Config-Override/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/elboby/flask-config-override" }, "release_url": "https://pypi.org/project/Flask-Config-Override/0.0.2/", "requires_dist": null, "requires_python": null, "summary": "Override Flask configuration via Cookie at runtime.", "version": "0.0.2" }, "last_serial": 784273, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "214704d8d9a4336daae3177d7a6629d3", "sha256": "9810e69f994ede4e26849290c2d0eb23ec96590b3f38776767a87761589d9d31" }, "downloads": -1, "filename": "Flask-Config-Override-0.0.1.tar.gz", "has_sig": false, "md5_digest": "214704d8d9a4336daae3177d7a6629d3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5234, "upload_time": "2013-03-25T03:06:32", "url": "https://files.pythonhosted.org/packages/ad/59/9e2776c39edc3242c58f5795fbe1c19568dfa9453b3f87bb9dd5d806dc08/Flask-Config-Override-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "094ffc8a9afc292876f4e2469ee7e37d", "sha256": "f35e88e9cf36aad8bac0c5c7bdc49229f7785ab61a01a643012c5e344aa1d6dc" }, "downloads": -1, "filename": "Flask-Config-Override-0.0.2.tar.gz", "has_sig": false, "md5_digest": "094ffc8a9afc292876f4e2469ee7e37d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5313, "upload_time": "2013-03-31T16:23:29", "url": "https://files.pythonhosted.org/packages/2f/18/1e396d94f8ff2a8ec0098ff9fc5f350aaff147831bc7bd6b58c9f2d3914e/Flask-Config-Override-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "094ffc8a9afc292876f4e2469ee7e37d", "sha256": "f35e88e9cf36aad8bac0c5c7bdc49229f7785ab61a01a643012c5e344aa1d6dc" }, "downloads": -1, "filename": "Flask-Config-Override-0.0.2.tar.gz", "has_sig": false, "md5_digest": "094ffc8a9afc292876f4e2469ee7e37d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5313, "upload_time": "2013-03-31T16:23:29", "url": "https://files.pythonhosted.org/packages/2f/18/1e396d94f8ff2a8ec0098ff9fc5f350aaff147831bc7bd6b58c9f2d3914e/Flask-Config-Override-0.0.2.tar.gz" } ] }