{ "info": { "author": "Austin Bingham", "author_email": "austin.bingham@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only" ], "description": "====\nfitb\n====\n\nA practical configuration system for Python.\n\nWith ``fitb``, you specify a collection of *configuration options* that your program/library/whatever needs. ``fitb`` then\nhelps you construct configuration objects and merge them together.\n\nA *configuration object* is simply a ``dict``, so ``fitb`` is helping you build ``dict``\\s. A *configuration option* specifies a\npath into the ``dict`` - that is, a sequence of keys into the ``dict`` and subdicts - along with a description of the option and\na default value.\n\nQuick start\n===========\n\nThe first thing you do with ``fitb`` is define a collection of config options:\n\n.. code-block:: python\n\n options = [(('my-app', 'screen'), fitb.Option('width', 'Width of screen', 100)), \n (('my-app', 'screen'), fitb.Option('height', 'Height of screen', 200))]\n\nEach entry in the list specifies a prefix path and the option itself. From this we can build a \ndefault config option:\n\n.. code-block:: python\n\n config = fitb.build_default_config(options)\n\nThis gives us an object like this:\n\n.. code-block:: python\n\n {'my-app': {'screen': {'width': 100, 'height': 200}}}\n\nwith which can do things like this:\n\n.. code-block:: python\n\n print(config['my-app']['screen']['width']\n\nor work with subconfigs:\n\n.. code-block:: python\n\n screen_config = config['my-app']['screen']\n print(screen_config['width'])\n\nYou can also merge configs together, putting entries from one config into another, possibly overwriting exiting options.\nThat looks like this:\n\n.. code-block:: python\n\n fitb.merge(dest=config, src={'my-app': {'screen': {'width': 400}}})\n\n # The `dest` config has been updated\n assert config['my-app']['screen']['width'] == 400\n\nThis ability to `merge` is useful because you can do things like:\n\n1. Create a default config\n2. Load user configs from files (e.g. TOML, ini, or whatever)\n3. Merge user configs into the default config.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/abingham/fitb", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "fitb", "package_url": "https://pypi.org/project/fitb/", "platform": "any", "project_url": "https://pypi.org/project/fitb/", "project_urls": { "Homepage": "https://github.com/abingham/fitb" }, "release_url": "https://pypi.org/project/fitb/1.0.1/", "requires_dist": [ "hypothesis ; extra == 'test'", "pytest ; extra == 'test'" ], "requires_python": "", "summary": "Practical configuration system", "version": "1.0.1" }, "last_serial": 5429805, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "5ba0ce3b9cdedbe6599243ca9efc91e7", "sha256": "039751353c6a9e6c8fba9cd5234e8b4ad15f2f84ae51b75970ab98ca2fffca2c" }, "downloads": -1, "filename": "fitb-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "5ba0ce3b9cdedbe6599243ca9efc91e7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4214, "upload_time": "2019-06-20T10:18:33", "url": "https://files.pythonhosted.org/packages/9c/08/63c58957405630be27f28281c33ab2a5826046b57ff3bb0aca6de3c79bbb/fitb-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2828aad8705a935389cfcf1c9676088d", "sha256": "6fa00349d2124590c2835cc40a47e8f2a133325fe3a1b0c95908db410fff3cc1" }, "downloads": -1, "filename": "fitb-1.0.0.tar.gz", "has_sig": false, "md5_digest": "2828aad8705a935389cfcf1c9676088d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3338, "upload_time": "2019-06-20T10:18:35", "url": "https://files.pythonhosted.org/packages/14/00/b596f3add55bd48d34f177821c95bd384b04aa97a42cb61debf32666c1f0/fitb-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "c3a27306faf228e2498820eb62965585", "sha256": "3b7f378f5ebf0e1d232e7b78558cb51a66b1788f9c80169b70b1cb7abab56b0c" }, "downloads": -1, "filename": "fitb-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "c3a27306faf228e2498820eb62965585", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4237, "upload_time": "2019-06-21T09:06:43", "url": "https://files.pythonhosted.org/packages/9f/58/c9113b91540ef24d7c2e275d94a9ea6700426a80600e1683fe2f6971e179/fitb-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5ec41917e74d217bf16a4d68c2f35806", "sha256": "46846963d9cb0e5a79510c70bfeb33cc6e480f084d0215d3d00885d9c858e433" }, "downloads": -1, "filename": "fitb-1.0.1.tar.gz", "has_sig": false, "md5_digest": "5ec41917e74d217bf16a4d68c2f35806", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3659, "upload_time": "2019-06-21T09:06:45", "url": "https://files.pythonhosted.org/packages/6a/eb/356d39e3fa01e71b2d17b8dedc122991ac376b2cbd32449badc724cd5485/fitb-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c3a27306faf228e2498820eb62965585", "sha256": "3b7f378f5ebf0e1d232e7b78558cb51a66b1788f9c80169b70b1cb7abab56b0c" }, "downloads": -1, "filename": "fitb-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "c3a27306faf228e2498820eb62965585", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4237, "upload_time": "2019-06-21T09:06:43", "url": "https://files.pythonhosted.org/packages/9f/58/c9113b91540ef24d7c2e275d94a9ea6700426a80600e1683fe2f6971e179/fitb-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5ec41917e74d217bf16a4d68c2f35806", "sha256": "46846963d9cb0e5a79510c70bfeb33cc6e480f084d0215d3d00885d9c858e433" }, "downloads": -1, "filename": "fitb-1.0.1.tar.gz", "has_sig": false, "md5_digest": "5ec41917e74d217bf16a4d68c2f35806", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3659, "upload_time": "2019-06-21T09:06:45", "url": "https://files.pythonhosted.org/packages/6a/eb/356d39e3fa01e71b2d17b8dedc122991ac376b2cbd32449badc724cd5485/fitb-1.0.1.tar.gz" } ] }