{ "info": { "author": "Geoff MacGill", "author_email": "skippydev007@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Software Development", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Text Processing :: Markup" ], "description": "figtree\n=======\n\n.. image:: https://badge.fury.io/py/figtree.svg\n :target: https://badge.fury.io/py/figtree\n.. image:: https://travis-ci.org/skippyprime/configs.svg?branch=master\n :target: https://travis-ci.org/skippyprime/configs\n.. image:: https://coveralls.io/repos/github/skippyprime/configs/badge.svg?branch=master\n :target: https://coveralls.io/github/skippyprime/configs?branch=master\n.. image:: https://requires.io/github/skippyprime/configs/requirements.svg?branch=master\n :target: https://requires.io/github/skippyprime/configs/requirements/?branch=master\n :alt: Requirements Status\n\nFigtree is a multi-format configuration file loader that normalizes all\nvalues into dictionaries and supports merging multiple configuration\nfiles into a single source. The later can be useful if you have multiple\nconfiguration sources and either want to load the first found or\noverride default settings (such as having a system wide and per user\nconfiguration file).\n\nFigtree supports the following configuration file formats:\n\n- YAML\n- JSON\n- XML (Currently ignores attributes)\n- INI (Currently does not support dictionaries within lists)\n\nThe Figtree API is also easily extensible to support new structured file\nformats through automatic registration of format handlers.\n\nSimple Example\n--------------\n\nConfiguration source: /etc/myproject/settings.yml\n\n.. code:: yaml\n\n section:\n debug: on\n complex:\n structure:\n value: 100\n multi:\n - 1\n - 2\n - 3\n flag: off\n\nLoading and access data.\n\n.. code:: python\n\n import figtree\n\n conf = figtree.load_config('@/etc/myproject/settings.yml')\n\n # configuration instances are dictionary like\n flag_set = conf['flag']\n\n # nested structures are also dictionary like\n is_debugging = conf['section']['debug']\n\n # easier lookups to avoid intermediate key checks\n is_debugging = conf['section.debug']\n is_debugging = conf.get('section.debug', False)\n\n # sub-dictionaries can be accessed the same way\n conf_section = conf['section']\n value = conf_section['complex.structure.value']\n\nLoading Options\n---------------\n\nConfiguration files can be loaded from the following sources:\n\n- Files (Local and HTTP accessible)\n- String Literals\n- Dictionary Objects\n\nMerge Settings\n~~~~~~~~~~~~~~\n\nLoad in order and merge settings. The last item has overrides others.\n\n.. code:: python\n\n import figtree\n\n conf = figtree.load_config(\n (\n {\n 'section': {\n 'debug': True\n },\n 'flag': False\n },\n '/etc/myproject/settings.yml',\n 'https://mydomain.test/settings',\n figtree.LiteralConfigSource('flag: off', hint='yaml')\n )\n )\n\nFirst Found\n~~~~~~~~~~~\n\nLoad the first found source. Mostly useful for file based sources.\n\n.. code:: python\n\n import figtree\n\n conf = figtree.load_first_found_config(\n (\n 'settings.yml',\n '~/.settings.yml',\n '/etc/myproject/settings.yml'\n )\n )", "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/skippyprime/configs", "keywords": "config,configuration", "license": "Apache 2.0", "maintainer": null, "maintainer_email": null, "name": "figtree", "package_url": "https://pypi.org/project/figtree/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/figtree/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/skippyprime/configs" }, "release_url": "https://pypi.org/project/figtree/0.2.2/", "requires_dist": null, "requires_python": null, "summary": "Multi-format configuration assembler", "version": "0.2.2" }, "last_serial": 2284849, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "0b35284aa0eaa9ae3d65af75348e43a5", "sha256": "c870194d103785993f6f005e4bee5a3352428849c3e368784b46225055e0f0f3" }, "downloads": -1, "filename": "figtree-0.2.tar.gz", "has_sig": false, "md5_digest": "0b35284aa0eaa9ae3d65af75348e43a5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7338, "upload_time": "2016-08-16T18:18:34", "url": "https://files.pythonhosted.org/packages/8d/31/dea10ddbaf0591b881e9382f741e4af86673d2c092a0a797a37229cc08e1/figtree-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "c3e4022cd034565f3448b67552002321", "sha256": "50da954b4640103219c946c50e47a0a10ce1fefaa6fc2be4f6b58a294ac8c44e" }, "downloads": -1, "filename": "figtree-0.2.1.tar.gz", "has_sig": false, "md5_digest": "c3e4022cd034565f3448b67552002321", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7514, "upload_time": "2016-08-16T18:35:04", "url": "https://files.pythonhosted.org/packages/c3/f9/099be9dc609d59c912b5320555c8f877fbdcf2c697686d6659a9ad3322e0/figtree-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "9249e837db4b401fb5ad3bd97151d7bb", "sha256": "df764785c4fae7cfe7fef3158be7d527ef951788c76d518b56b7739fa917a352" }, "downloads": -1, "filename": "figtree-0.2.2.tar.gz", "has_sig": false, "md5_digest": "9249e837db4b401fb5ad3bd97151d7bb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7739, "upload_time": "2016-08-16T19:31:34", "url": "https://files.pythonhosted.org/packages/05/e2/818e3d2cec249fb38f7c2d58bbc2373024a0f55c46568e630e1396c4cf1f/figtree-0.2.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9249e837db4b401fb5ad3bd97151d7bb", "sha256": "df764785c4fae7cfe7fef3158be7d527ef951788c76d518b56b7739fa917a352" }, "downloads": -1, "filename": "figtree-0.2.2.tar.gz", "has_sig": false, "md5_digest": "9249e837db4b401fb5ad3bd97151d7bb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7739, "upload_time": "2016-08-16T19:31:34", "url": "https://files.pythonhosted.org/packages/05/e2/818e3d2cec249fb38f7c2d58bbc2373024a0f55c46568e630e1396c4cf1f/figtree-0.2.2.tar.gz" } ] }