{ "info": { "author": "Dmitry Dygalo", "author_email": "dmitry.dygalo@kiwi.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython" ], "description": ".. _-konfetti-:\n\n\ud83c\udf8a konfetti \ud83c\udf8a\n==============\n\n|codecov| |Build| |Version| |Python versions| |License|\n\nDescription\n-----------\n\n``konfetti`` is a Python configuration management system with an intuitive\nAPI, lazy evaluation and (a)sync Vault support.\n\nThe interface design and features are heavily inspired by `decouple`_, `Django`_, `envparse`_ and `dynaconf`_.\n\n**Key features**:\n\n- Lazy evaluation;\n- Built-in environment variables support;\n- Built-in async Vault access support;\n- Helpers for tests;\n- Django & Flask integration.\n\n**Benefits of lazy evaluation**:\n\n- Faster & simpler test runs; No need for evaluation the the whole\n project config if it is not used\n- Avoid network calls during imports until necessary;\n\nQuickstart\n----------\n\nTo use ``konfetti`` you need to define:\n\n- configuration variables in a module or a class;\n- an access point;\n\nSettings module\n^^^^^^^^^^^^^^^\n\n.. code:: python\n\n # app_name/settings/production.py\n from konfetti import env, vault\n\n VAULT_ADDR = env(\"VAULT_ADDR\")\n VAULT_TOKEN = env(\"VAULT_TOKEN\")\n\n DEBUG = env(\"DEBUG\", default=False)\n DATABASE_URI = vault(\"path/to/db\")\n\nThe naming convention for variables names is upper case, other variables\nwill be ignored. To work with Vault it is required to specify\n``VAULT_ADDR`` and ``VAULT_TOKEN`` in the settings module.\n\nAccess point\n^^^^^^^^^^^^\n\n.. code:: python\n\n # app_name/settings/__init__.py\n from konfetti import Konfig, AsyncVaultBackend\n\n config = Konfig(vault_backend=AsyncVaultBackend(\"/secret/team\"))\n\n``konfetti`` relies on ``KONFETTI_SETTINGS`` environment variable to\ndiscover your settings module, in the case above:\n\n``export KONFETTI_SETTINGS=app_name.settings.production``\n\nAlternatively the access point could be initiated from an object, importable string, mapping or a JSON file.\n\n.. code:: python\n\n class TestSettings:\n VALUE = \"secret\"\n config = Konfig.from_object(TestSettings, ...)\n\n.. code:: python\n\n config = Konfig.from_object(\"path.to.settings\", ...)\n\n # If the config is in the same module\n SECRET = vault(\"/path/to\")[\"secret\"]\n config = Konfig.from_object(__name__, ...)\n\n.. code:: python\n\n config = Konfig.from_mapping({\"SECRET\": 42}, ...)\n\n.. code:: python\n\n config = Konfig.from_json(\"/path/to.json\")\n\nUsage\n^^^^^\n\nThe settings module/class with configuration options shouldn't be\naccessed directly, because the aforementioned features are implemented\nin the access point level.\n\n.. code:: python\n\n from app_name.settings import config\n\n async def something():\n await config.DATABASE_URI # asynchronously taken from Vault\n debug = config.DEBUG # Usual sync access\n\nDocumentation\n-------------\n\nFor full documentation, please see https://konfetti.readthedocs.io/en/latest/\n\nOr you can look at the ``docs/`` directory in the repository.\n\nPython support\n--------------\n\nKonfetti supports Python 2.7, 3.5, 3.6, 3.7 and 3.8\n\nLicense\n-------\n\nThe code in this project is licensed under `MIT license`_. By contributing to `konfetti`, you agree that your contributions will be licensed under its MIT license.\n\n.. |codecov| image:: https://codecov.io/gh/kiwicom/konfetti/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/kiwicom/konfetti\n.. |Build| image:: https://travis-ci.org/kiwicom/konfetti.svg?branch=master\n :target: https://travis-ci.org/kiwicom/konfetti\n.. |Version| image:: https://img.shields.io/pypi/v/konfetti.svg\n :target: https://pypi.org/project/konfetti/\n.. |Python versions| image:: https://img.shields.io/pypi/pyversions/konfetti.svg\n :target: https://pypi.org/project/konfetti/\n.. |License| image:: https://img.shields.io/pypi/l/konfetti.svg\n :target: https://opensource.org/licenses/MIT\n\n.. _Django: https://github.com/django/django\n.. _decouple: https://github.com/henriquebastos/python-decouple\n.. _envparse: https://github.com/rconradharris/envparse\n.. _dynaconf: https://github.com/rochacbruno/dynaconf\n\n.. _MIT license: https://opensource.org/licenses/MIT\n\n\n", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/kiwicom/konfetti", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "konfetti", "package_url": "https://pypi.org/project/konfetti/", "platform": "", "project_url": "https://pypi.org/project/konfetti/", "project_urls": { "Homepage": "https://github.com/kiwicom/konfetti" }, "release_url": "https://pypi.org/project/konfetti/0.7.2/", "requires_dist": [ "attrs", "python-dotenv", "aiohttp ; extra == 'async-vault'", "tenacity ; extra == 'async-vault'", "hvac ; extra == 'vault'", "tenacity ; extra == 'vault'" ], "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*", "summary": "`konfetti` provides a framework-independent way for configuration of applications or libraries written in Python.", "version": "0.7.2" }, "last_serial": 5549491, "releases": { "0.6.0": [ { "comment_text": "", "digests": { "md5": "1fa2f8d0dcdd712a4a36104ac424a678", "sha256": "04bb557dda19cd3bf343d4bdc02b3212f75a2e535092260fc4bfb3908ddfc819" }, "downloads": -1, "filename": "konfetti-0.6.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "1fa2f8d0dcdd712a4a36104ac424a678", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*", "size": 24448, "upload_time": "2019-06-30T13:22:38", "url": "https://files.pythonhosted.org/packages/1f/35/97805c34f9d49872797c440903d30cc6a228dd7bbb6e308dc856aa383b80/konfetti-0.6.0-py2.py3-none-any.whl" } ], "0.7.0": [ { "comment_text": "", "digests": { "md5": "a9c48e8f54e7c27c7b3de391503384f4", "sha256": "48202f2b0e6363810487b6146f82ff1f95c4ec23d54f45d94d79a0d85aecfc08" }, "downloads": -1, "filename": "konfetti-0.7.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a9c48e8f54e7c27c7b3de391503384f4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*", "size": 24864, "upload_time": "2019-07-15T09:34:11", "url": "https://files.pythonhosted.org/packages/09/c0/c9c35b00f8198ef05acb76325d8c1793a0bb5ea95b9c12f3d095b248853b/konfetti-0.7.0-py2.py3-none-any.whl" } ], "0.7.1": [ { "comment_text": "", "digests": { "md5": "ebba07ffbb12bbd51c2b8c9aa3dca6ec", "sha256": "70764a7cb07acc318efb7903125ac596e5b6606e7f1e67fe7218715462eba560" }, "downloads": -1, "filename": "konfetti-0.7.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ebba07ffbb12bbd51c2b8c9aa3dca6ec", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*", "size": 24888, "upload_time": "2019-07-17T07:51:18", "url": "https://files.pythonhosted.org/packages/a9/9c/16dd569efaa08ad33a380d83a2efac116c13288baad01fa1dc357bcdf1ea/konfetti-0.7.1-py2.py3-none-any.whl" } ], "0.7.2": [ { "comment_text": "", "digests": { "md5": "a54fbee88026cc7538fda3a83ef8d8be", "sha256": "a5659cb4396646812b578db3dc4ca31b48a32d2d4bfc3ac9835212e3e3ea4286" }, "downloads": -1, "filename": "konfetti-0.7.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a54fbee88026cc7538fda3a83ef8d8be", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*", "size": 25059, "upload_time": "2019-07-18T07:26:03", "url": "https://files.pythonhosted.org/packages/13/00/ff9738acfeded13b91b977d45ee0b0d648292a955bd5b357ba88c6bc7226/konfetti-0.7.2-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a54fbee88026cc7538fda3a83ef8d8be", "sha256": "a5659cb4396646812b578db3dc4ca31b48a32d2d4bfc3ac9835212e3e3ea4286" }, "downloads": -1, "filename": "konfetti-0.7.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a54fbee88026cc7538fda3a83ef8d8be", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*", "size": 25059, "upload_time": "2019-07-18T07:26:03", "url": "https://files.pythonhosted.org/packages/13/00/ff9738acfeded13b91b977d45ee0b0d648292a955bd5b357ba88c6bc7226/konfetti-0.7.2-py2.py3-none-any.whl" } ] }