{ "info": { "author": "Philipp Busch", "author_email": "hakkeroid@philippbusch.de", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Libraries" ], "description": "configstacker\n=============\n\n.. start-introduction\n\n.. image:: https://gitlab.com/hakkropolis/configstacker/badges/v0.2.0/pipeline.svg\n :alt: pipeline status\n :target: https://gitlab.com/hakkropolis/configstacker/commits/v0.2.0\n\n.. image:: https://gitlab.com/hakkropolis/configstacker/badges/v0.2.0/coverage.svg\n :alt: coverage report\n :target: https://gitlab.com/hakkropolis/configstacker/commits/v0.2.0\n\n\nWhat is configstacker?\n----------------------\n\nConfigstacker is a python library with the goal to simplify\nconfiguration handling as much as possible. You can read configurations\nfrom different sources (e.g. files, environment variables and others)\nand load single or merge multiple sources at will. The resulting\nconfiguration object can be used like a dictionary or with dot-notation.\nIf you need additional flexibility configstacker also allows you to\nspecify converters for values or merging strategies for keys that occur\nmultiple times throughout different sources. If this is still not\nsufficient enough configstacker makes it very easy for you to add\nadditional source handlers.\n\n.. code-block:: python\n :name: single-source-example\n\n #\n # Single Source Example\n #\n from configstacker import YAMLFile\n\n config = YAMLFile('/path/to/my/config.yml')\n\n # Dot-notation access\n assert config.a_key is True\n\n # Mixed dictionary and dot-notation access\n assert config['subsection'].nested_key == 100\n\n # Dictionary-like interface\n assert config.keys() == ['a_key', 'subsection']\n\n # Dictionary dumping on any level\n assert config.dump() == {'a_key': True, 'subsection': {'nested_key': 100}}\n assert config.subsection.dump() == {'nested_key': 100}\n\n # New value assignment\n config.new_value = 10.0\n assert config.new_value == 10.0\n\n\n.. code-block:: python\n :name: multi-source-example\n\n #\n # Multi Source Example\n #\n import configstacker as cs\n\n # The resulting configuration object behaves\n # the same as a single source one.\n config = cs.StackedConfig(\n # The order of sources defines their search priority whereas the\n # last element has the highest one.\n cs.Environment(prefix='MYAPP'),\n cs.YAMLFile('/path/to/my/config.yml')\n )\n\n # Higher priority values shadow lower priority values.\n assert config.a_key is False\n\n # Lower prioritized values which are not shadowed stay accessible.\n assert config['subsection'].nested_key == 100\n\n # New values will be added to the source that has the highest\n # priority and is writable.\n config.other_new_value = True\n assert config.other_new_value is True\n\n # In this case the new item was added to the last element in the\n # source list.\n assert config.source_list[-1].other_new_value\n\n.. stop-introduction\n\nExamples for type conversion and merging strategies can be found in the\n`documentation `_.\n\n\nLatest Version and History\n--------------------------\n\n.. start-version\n\nConfigstacker adheres to `Semantic Versioning `_.\n\nThe current version is 0.2.0 which means configstacker is still in\na planning phase. As such it is *not meant for production use*. That\nsaid it is already very stable and should hit its first major version\nsoon.\n\n.. stop-version\n\nChanges can be found in `CHANGELOG `_.\n\n\n.. start-installation\n\nInstallation\n------------\n\nConfigstacker can be installed with pip and only requires\n`six `_ for the minimal installation.\n\n.. code::\n\n pip install configstacker\n\nHowever, some of the source handlers require additional packages when in\nuse.\n\n * `YAMLFile` requires `pyyaml `_\n\nYou can use the following syntax to install all optional dependencies.\nLeave out those from the brackets you do not need.\n\n.. code::\n\n pip install configstacker[yaml]\n\n.. note::\n\n New source handlers with additional dependencies might be added over\n time.\n\n.. stop-installation\n\n\nDocumentation\n-------------\n\nConfigstacker provides a `user documentation `_\non `readthedocs.org `_.\n\n\nLicensing\n---------\n\nPlease see `LICENSE `_.\n\n\nContribution\n------------\n\nContributions are very welcome. The main development happens on\n`gitlab `_. For reporting\nissues you can also use `github `_.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://gitlab.com/hakkropolis/configstacker", "keywords": "configuration hierarchy multi stacked configs", "license": "BSD-3-clause", "maintainer": "", "maintainer_email": "", "name": "configstacker", "package_url": "https://pypi.org/project/configstacker/", "platform": "", "project_url": "https://pypi.org/project/configstacker/", "project_urls": { "Bug Tracker": "https://gitlab.com/hakkropolis/configstacker/issues", "Documentation": "https://configstacker.readthedocs.io", "Homepage": "https://gitlab.com/hakkropolis/configstacker", "Source Code": "https://gitlab.com/hakkropolis/configstacker/" }, "release_url": "https://pypi.org/project/configstacker/0.2.0/", "requires_dist": [ "six", "pyyaml ; extra == 'yaml'" ], "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*", "summary": "Aggregates multiple configuration sources into one configuration object with dot-notation or dictionary-like access.", "version": "0.2.0" }, "last_serial": 5571693, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "97d5b45f86608d6cb1ed5adcbb4dd472", "sha256": "75693673d87af3891e05f568886d30fd99439a3f70d89c0549a4f65eb7210ff1" }, "downloads": -1, "filename": "configstacker-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "97d5b45f86608d6cb1ed5adcbb4dd472", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 21821, "upload_time": "2019-07-20T20:55:29", "url": "https://files.pythonhosted.org/packages/4a/cc/3f2896d3c2551860dbc88f294b03ddf9cd18ac76e3f492d7dd05981c23a2/configstacker-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9e1d43ae4c61635d72f2a22f9c2919e9", "sha256": "badb7ab9cd2e38c0e7a3e1bb7884b146ae7614400c93e211135b0c9c74ec1e2b" }, "downloads": -1, "filename": "configstacker-0.1.0.tar.gz", "has_sig": false, "md5_digest": "9e1d43ae4c61635d72f2a22f9c2919e9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16136, "upload_time": "2019-07-20T20:55:32", "url": "https://files.pythonhosted.org/packages/16/18/77adbfff1eb14b3b1cf810db1fb1a8d43fc61816bab42cf5b8de3a71373e/configstacker-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "7118a720fe7ad48aa19d661f0cd1295d", "sha256": "f5e6057b9f7e536f174b4a47830354d51590667eba3b1fed0fec4186093f91df" }, "downloads": -1, "filename": "configstacker-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "7118a720fe7ad48aa19d661f0cd1295d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*", "size": 22373, "upload_time": "2019-07-23T10:17:26", "url": "https://files.pythonhosted.org/packages/4b/f3/71de320decad728cbc3bccd265a9e32571129f1999b6047a67e2dea1fe1a/configstacker-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "182b0f6046c3c08fe904d5e1b4523f8f", "sha256": "d11b48f0d772a36d43e99ae637fc2838b4de4fe0a952626e55dc9eee4c3096c8" }, "downloads": -1, "filename": "configstacker-0.2.0.tar.gz", "has_sig": false, "md5_digest": "182b0f6046c3c08fe904d5e1b4523f8f", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*", "size": 16825, "upload_time": "2019-07-23T10:17:28", "url": "https://files.pythonhosted.org/packages/e3/5b/84d993eb3ab2bb75c83d0f19b851800bcc748756d3973c4b47af2af557db/configstacker-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7118a720fe7ad48aa19d661f0cd1295d", "sha256": "f5e6057b9f7e536f174b4a47830354d51590667eba3b1fed0fec4186093f91df" }, "downloads": -1, "filename": "configstacker-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "7118a720fe7ad48aa19d661f0cd1295d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*", "size": 22373, "upload_time": "2019-07-23T10:17:26", "url": "https://files.pythonhosted.org/packages/4b/f3/71de320decad728cbc3bccd265a9e32571129f1999b6047a67e2dea1fe1a/configstacker-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "182b0f6046c3c08fe904d5e1b4523f8f", "sha256": "d11b48f0d772a36d43e99ae637fc2838b4de4fe0a952626e55dc9eee4c3096c8" }, "downloads": -1, "filename": "configstacker-0.2.0.tar.gz", "has_sig": false, "md5_digest": "182b0f6046c3c08fe904d5e1b4523f8f", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*", "size": 16825, "upload_time": "2019-07-23T10:17:28", "url": "https://files.pythonhosted.org/packages/e3/5b/84d993eb3ab2bb75c83d0f19b851800bcc748756d3973c4b47af2af557db/configstacker-0.2.0.tar.gz" } ] }