{ "info": { "author": "Internap Hosting", "author_email": "opensource@internap.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "Intended Audience :: Telecommunications Industry", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4" ], "description": "[![Build Status](https://travis-ci.org/internap/python-config-probe.svg?branch=master)](https://travis-ci.org/internap/python-config-probe)\n[![PyPI version](https://badge.fury.io/py/config-probe.svg)](http://badge.fury.io/py/config-probe)\n\n\nMission\n=======\n\nProvide an auto-discovery process of configurations for simple code use. Given a path and a list of pattern,\nthe result config will be a shortcut to any config.\n\n## Usage\n\nSetup:\n\n config = probe(\n path=\"path/to/my/files\",\n patterns=[\"path/(*)/file.yaml\"]\n )\n\nUse it:\n\n print config.mynamespace.key\n\n## Parameters\n\n- **path**\n\n Initial path to probe. Patterns will be tested against the file structure underneath the path\n and it will be ignored in determining the namespacing.\n\n- **patterns**\n\n A list of file paths containing (or not) placeholders \"(\\*)\" o find where the configuration files are located.\n The patterns definition order defines which keys has the priority, the last one being the most relevant.\n\n Each placeholder in the path will result in a namespace in the resulting config. So let's say you have a pattern\n\n dir1/(*)/dir2/(*).yaml\n\n If this pattern finds the file : \"dir1/**ns1**/dir2/**file**.yaml\" that contains \"key: 'value'\", the resulting\n config will be\n\n config.ns1.file.key == \"value\"\n\n now if the pattern was\n\n dir1/ns1/dir2/file.yaml\n\n for the same file, the resulting config would simply be\n\n config.key == \"value\"\n\n so you can use placeholders \"(\\*)\" to namespace the resulting config and use \"\\*\" without the parenthesis\n to have a variable path without the namespacing\n\n dir1/(*)/dir2/*.yaml\n config.ns1.key == \"value\"\n\n## Mocking the probing\n\nYour unit test can have your code use fake_probe instead to which to give a dict and it will appear as if it\nwas just probed. Example:\n\n config = fake_probe({\n \"ns1\": {\n \"file\": {\n \"key\": \"value\"\n }\n }\n })\n # then\n config.ns1.file.key == \"value\"\n\nContributing\n============\n\nFeel free to raise issues and send some pull request, we'll be happy to look at them!", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/internap/python-config-probe", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "config-probe", "package_url": "https://pypi.org/project/config-probe/", "platform": "", "project_url": "https://pypi.org/project/config-probe/", "project_urls": { "Homepage": "https://github.com/internap/python-config-probe" }, "release_url": "https://pypi.org/project/config-probe/0.2.0/", "requires_dist": null, "requires_python": "", "summary": "Auto-discovery of configurations for easy inline use", "version": "0.2.0" }, "last_serial": 5041186, "releases": { "0.0.1": [], "0.0.2": [ { "comment_text": "", "digests": { "md5": "569ecabf917ffaacc677c884dfe67cae", "sha256": "7a61ae66fea6d1da625f27d486746aee2c34f5b29f9d62581660b4b721ef1911" }, "downloads": -1, "filename": "config-probe-0.0.2.tar.gz", "has_sig": false, "md5_digest": "569ecabf917ffaacc677c884dfe67cae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9219, "upload_time": "2016-05-17T21:45:18", "url": "https://files.pythonhosted.org/packages/7f/1c/83c45b9f085f27e81fd5a88c9c65a80164c1cce22d11afb40c6b9fd7ec3b/config-probe-0.0.2.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "c17b6db8729bd27b10913b46da328283", "sha256": "f26d2a74ae6d5a55efd4bfbd29463fae8d0023b708478448f16a0ac1e307e58f" }, "downloads": -1, "filename": "config-probe-0.1.0.tar.gz", "has_sig": false, "md5_digest": "c17b6db8729bd27b10913b46da328283", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9475, "upload_time": "2016-05-19T20:50:50", "url": "https://files.pythonhosted.org/packages/27/b7/814b721b25e476fadf1d58890beccc18a079c143282027d3836ac0edb3d4/config-probe-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "de5fa548883fde84ef42952ddcd3b6c1", "sha256": "1f3c61a5f5daaee6d42b7d416ecfe57122d63de078a984ce7ea314a0a34abb12" }, "downloads": -1, "filename": "config-probe-0.1.1.tar.gz", "has_sig": false, "md5_digest": "de5fa548883fde84ef42952ddcd3b6c1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10036, "upload_time": "2016-05-24T16:08:57", "url": "https://files.pythonhosted.org/packages/5a/e8/00152883e7c3043dac8c281335d5acc9521fcc122ae039bd0ae86b017d56/config-probe-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "78090a94592c80faf2c91668099e3dd8", "sha256": "f38605f0ef4113b2c7cc9bf62bceab8a6b808508e77578ed3623ad4f5ca425d2" }, "downloads": -1, "filename": "config-probe-0.1.2.tar.gz", "has_sig": false, "md5_digest": "78090a94592c80faf2c91668099e3dd8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10239, "upload_time": "2016-05-24T18:47:28", "url": "https://files.pythonhosted.org/packages/4e/b7/7e7d20444f3bec41bd19383b856b86d9919a1b41c6cba55d6111fb9ac9ae/config-probe-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "9bcb793dc31f7721ec5309950dde8aaf", "sha256": "06a79a7aacf8fbaabe675be788265481aaa89defedc4839c7154c1869b1c9b03" }, "downloads": -1, "filename": "config-probe-0.1.3.tar.gz", "has_sig": false, "md5_digest": "9bcb793dc31f7721ec5309950dde8aaf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11132, "upload_time": "2016-12-07T16:07:08", "url": "https://files.pythonhosted.org/packages/f4/44/c195c0c0895346958fe9ec4cbfdabe12899e8532e0f73b22471063ee252f/config-probe-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "7523ac0874e6ae62d8c27c7ae11e708f", "sha256": "0b8b9ffe884f768d53b004f8e245719a4aa6b866778237eb97918b9cce2136ee" }, "downloads": -1, "filename": "config-probe-0.1.4.tar.gz", "has_sig": false, "md5_digest": "7523ac0874e6ae62d8c27c7ae11e708f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11173, "upload_time": "2016-12-07T19:37:40", "url": "https://files.pythonhosted.org/packages/5a/4b/33e7abb79bdc0a51339bebe84ad1e8421a445bf225ff463b80ab10124733/config-probe-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "b70c6cf8dac467cd9e681968ebc28a9f", "sha256": "2225d7f6edf265dc60e97333ad971c32e78ac617bff0b9a3b05905a7958f6022" }, "downloads": -1, "filename": "config-probe-0.1.5.tar.gz", "has_sig": false, "md5_digest": "b70c6cf8dac467cd9e681968ebc28a9f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11261, "upload_time": "2016-12-09T19:15:01", "url": "https://files.pythonhosted.org/packages/ba/a0/030cf3b614bec0c2d7e565cad70e49cd7cfe4bde2b4214d15669b9beedec/config-probe-0.1.5.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "ea8b28108cf7bbe21949f066dda6933e", "sha256": "e4a9050a3046fb5eef7f8ffb7593b33a8ac6a594122911c0a541ed573f1fbeae" }, "downloads": -1, "filename": "config-probe-0.2.0.tar.gz", "has_sig": false, "md5_digest": "ea8b28108cf7bbe21949f066dda6933e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11142, "upload_time": "2019-04-01T21:57:13", "url": "https://files.pythonhosted.org/packages/e2/be/17f796ed7c2d8da893b7bc68494a1377cce23e4dd92fe9a88776059ef5d3/config-probe-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ea8b28108cf7bbe21949f066dda6933e", "sha256": "e4a9050a3046fb5eef7f8ffb7593b33a8ac6a594122911c0a541ed573f1fbeae" }, "downloads": -1, "filename": "config-probe-0.2.0.tar.gz", "has_sig": false, "md5_digest": "ea8b28108cf7bbe21949f066dda6933e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11142, "upload_time": "2019-04-01T21:57:13", "url": "https://files.pythonhosted.org/packages/e2/be/17f796ed7c2d8da893b7bc68494a1377cce23e4dd92fe9a88776059ef5d3/config-probe-0.2.0.tar.gz" } ] }