{ "info": { "author": "Josef Lange", "author_email": "josef.d.lange@me.com", "bugtrack_url": null, "classifiers": [], "description": "Configi\n=======\n\nConfigi is a straightforward wrapper for configuration data. It provides a consistent interface to a number of back-ends, currently via arbitrary HTTP JSON loading, Redis K/V store, and S3 JSON file loading.\n\nUsing Configi\n-------------\n\nThe code itself is documented, but here's a couple of recipes:\n\nS3 Config Source\n~~~~~~~~~~~~~~~~\n.. code-block:: python\n\n from configi import DynamicConfig, S3ConfigSource\n import boto # Boto not included, but if you want to use S3ConfigSource\n # you probably have it already. I hope.\n\n s3 = boto.connect_s3()\n bucket = s3.get_bucket(\"my-config-repository\")\n config_file_key = bucket.get_key(\"my-config-file-key\")\n\n source = S3ConfigSource(config_file_key)\n config = DynamicConfig(\n source,\n expiry=(60*4), # Every four hours reload\n quiet_mode=True, # Errors will `print` instead of throwing Exceptions.\n namespace_dicts=True, # Turn dictionaries into dot-accessible namespaces.\n defaults={'some_key': 'a_value'} # Defaults dict is used to return values, if a key is unset remotely.\n )\n\n print config.foo\n > None\n\n config.foo = 'bar'\n print config.foo\n > bar\n\n print config.some_key\n > a_value\n\n config.some_key = 'banana'\n print config.some_key\n > banana\n\nRedis Config Source\n~~~~~~~~~~~~~~~~~~~\n.. code-block:: python\n\n from configi import DynamicConfig, RedisConfigSource\n import redis # Redis not included, but if you want to use\n # RedisConfigSource, then you'll need it.\n\n r = redis.StrictRedis() # Get a Redis connection. Yours will have more parameters.\n source = RedisConfigSource(r, prefix='MY_AWESOME_CONFIGI_CONFIG_SETUP:') # Default prefix is 'CONFIGI:'\n config = DynamicConfig(\n source,\n expiry=(60*4), # Every four hours reload\n quiet_mode=True, # Errors will `print` instead of throwing Exceptions.\n namespace_dicts=True, # Turn dictionaries into dot-accessible namespaces.\n defaults={'some_key': 'a_value'} # Defaults dict is used to return values, if a key is unset remotely.\n )\n\n print config.foo\n > None\n\n config.foo = 'bar'\n print config.foo\n > bar\n\n print config.some_key # Even though defaults were passed, any remotely-set value overrides.\n > orangutan\n\n\nJSON File Config Source\n~~~~~~~~~~~~~~~~~~~~~~~\n.. code-block:: python\n\n from configi import DynamicConfig, JSONConfigSource\n\n source = JSONConfigSource(\"https://some-url.com/my-config-file.json\")\n config = DynamicConfig(\n source,\n expiry=(60*4), # Every four hours reload\n quiet_mode=True, # Errors will `print` instead of throwing Exceptions.\n namespace_dicts=True, # Turn dictionaries into dot-accessible namespaces.\n defaults={'some_key': 'a_value'} # Defaults dict is used to return values, if a key is unset remotely.\n )\n\n print config.foo\n > None\n\n config.foo = 'bar'\n > DynamicConfigError: Could not set key foo\n\n\n\nCaveats\n-------\n\nSome of the config sources are better suited for read-only config. Namely, the arbitrary-JSON-file-based config is strictly read-only. The S3-based config is read/write but not very optimal for high-write scenarios. Redis, if a Redis store is both secure and available to you, is probably your best bet.", "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/josefdlange/configi", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "configi", "package_url": "https://pypi.org/project/configi/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/configi/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/josefdlange/configi" }, "release_url": "https://pypi.org/project/configi/0.1.3/", "requires_dist": null, "requires_python": null, "summary": "Configi is a straightforward wrapper for configuration data. It provides a consistent interface to a number of back-ends, currently via arbitrary HTTP JSON loading, Redis K/V store, and S3 JSON file loading.", "version": "0.1.3" }, "last_serial": 2529179, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "80e897f72cafa324006cc4326f308b87", "sha256": "7d99787632e4c7ceffb227aa9f586d7a084028ed470612ea9e506e0b1eaba68a" }, "downloads": -1, "filename": "configi-0.0.1.tar.gz", "has_sig": false, "md5_digest": "80e897f72cafa324006cc4326f308b87", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3432, "upload_time": "2016-09-19T16:19:43", "url": "https://files.pythonhosted.org/packages/cf/31/fec8216ea32bcfb38e4c4b37953832827566c6e8b89cad3bf8c14d4d7786/configi-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "c0617bf55692b81c6793d637acd74011", "sha256": "01a8bf20f313ea70ed4b842f876d43a869f205672510a7c793073140d09b6fb8" }, "downloads": -1, "filename": "configi-0.0.2.tar.gz", "has_sig": false, "md5_digest": "c0617bf55692b81c6793d637acd74011", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3405, "upload_time": "2016-09-19T21:33:40", "url": "https://files.pythonhosted.org/packages/02/7a/d54d93f37c4463a2cc90b34fb7810b2d2d95c03d3bdb1a05963ee50dae12/configi-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "52921e0a3a224d6e8582eddbb77823c1", "sha256": "58bc7d17c75b36e4c16c11fc6318bdf7cd16eaf57de33d078b9ca8c87e54f0c0" }, "downloads": -1, "filename": "configi-0.0.3.tar.gz", "has_sig": false, "md5_digest": "52921e0a3a224d6e8582eddbb77823c1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3568, "upload_time": "2016-12-19T17:44:13", "url": "https://files.pythonhosted.org/packages/63/79/12af55e205f05d4d5b8e1deb8823fce303ceb77dea2008cb6ed50b527c89/configi-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "28f17810e1e6077aaee2380046eed927", "sha256": "5cd3a4f606506cd4d3a5a1a0a34d281108d4742402e94790aeda45955554276c" }, "downloads": -1, "filename": "configi-0.0.4.tar.gz", "has_sig": false, "md5_digest": "28f17810e1e6077aaee2380046eed927", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3568, "upload_time": "2016-12-19T17:46:16", "url": "https://files.pythonhosted.org/packages/7c/1f/cc0b634b2e73b0f373868a47680a80a5a66e20b39ad05a43bfe13bca245c/configi-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "22b1d31e38ebfa41535753507858db09", "sha256": "96397dc50be45e98737da5f2b8739aa2913484acc2169b40ff89e3fef5074a27" }, "downloads": -1, "filename": "configi-0.0.5.tar.gz", "has_sig": false, "md5_digest": "22b1d31e38ebfa41535753507858db09", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3572, "upload_time": "2016-12-19T17:49:34", "url": "https://files.pythonhosted.org/packages/6f/7d/1e15f37c1088cf26391f9dac76feac6d5997112a80a2041f8f1c5e3db1a8/configi-0.0.5.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "514f6d8b5cf35279ec10e9924a2193f3", "sha256": "7510220c72592bcfe9c96f0852fe1db86d93b6e27dc296613ddd3862973c1b03" }, "downloads": -1, "filename": "configi-0.1.0.tar.gz", "has_sig": false, "md5_digest": "514f6d8b5cf35279ec10e9924a2193f3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3578, "upload_time": "2016-12-19T17:57:58", "url": "https://files.pythonhosted.org/packages/bf/49/da7e8f37db9cdd60d401e547fb39fcf29949ae1deded41e8be031afeb9bb/configi-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "c02d0fb7f4329e6f5497d1a974cf02cc", "sha256": "7ce676217de04e1d534d9ea1843a8f94148db3679202734e8663cc5e85892c26" }, "downloads": -1, "filename": "configi-0.1.1.tar.gz", "has_sig": false, "md5_digest": "c02d0fb7f4329e6f5497d1a974cf02cc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3648, "upload_time": "2016-12-19T18:29:02", "url": "https://files.pythonhosted.org/packages/66/11/f99800e44bed98530e7876101865a7daf30dafc8c2bd804d97f68926492a/configi-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "020e0fe89d22ae16e18cead56e82c899", "sha256": "b149692646c677dc9a6abd7b8bf05df0511a0eb74cbb30e70db69f125846b0a5" }, "downloads": -1, "filename": "configi-0.1.2.tar.gz", "has_sig": false, "md5_digest": "020e0fe89d22ae16e18cead56e82c899", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3649, "upload_time": "2016-12-19T18:30:00", "url": "https://files.pythonhosted.org/packages/0a/08/f5797520b7fcb4275132938220e6b98e3361efad2a30fc8098892f9a2fac/configi-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "771a77da23435c2b450f8f07a6f339b1", "sha256": "bc32a8d3ed5ef17afebcfa452d7f5f6cdd93b25ca63f07d2a20a5bdc4204ac90" }, "downloads": -1, "filename": "configi-0.1.3.tar.gz", "has_sig": false, "md5_digest": "771a77da23435c2b450f8f07a6f339b1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3658, "upload_time": "2016-12-19T21:41:43", "url": "https://files.pythonhosted.org/packages/33/54/df1a03357f512199a5b2eb200ab2af6bfcce30e5a1dfbed61c2b28e6fe26/configi-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "771a77da23435c2b450f8f07a6f339b1", "sha256": "bc32a8d3ed5ef17afebcfa452d7f5f6cdd93b25ca63f07d2a20a5bdc4204ac90" }, "downloads": -1, "filename": "configi-0.1.3.tar.gz", "has_sig": false, "md5_digest": "771a77da23435c2b450f8f07a6f339b1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3658, "upload_time": "2016-12-19T21:41:43", "url": "https://files.pythonhosted.org/packages/33/54/df1a03357f512199a5b2eb200ab2af6bfcce30e5a1dfbed61c2b28e6fe26/configi-0.1.3.tar.gz" } ] }