{ "info": { "author": "Alex Myasoedov", "author_email": "msoedov@gmail.com", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "Configus - a declarative contract for configuration\n\n\n### Instalation\n\n```\npip install configus\n```\n\n### Features\n\n- [x] Unified spec for process config\n- [x] Strict validation of config, no more trailing whitespaces or runtime panics from malphormed uri's\n\n- [x] Support parametrization from env variables and cli arguments at the same time.\n - [x] The same param could passed as `export DEBUG=on` or `--debug=on`\n- [x] Auto load of `.env` file\n- [x] Easy to mock for unit tests\n\n### Usage\n\nLet start with a simple spec that our requires `debug`, `version` and `secret_cookie` configuration params\n\n```python\n# app.py\nfrom configus import config, trafaret as t\n\nif __name__ == '__main__':\n # Describes shape of the data params which will be taken either from env, cli args or envfile.\n schema = t.Dict(DEBUG=t.StrBool, VERSION=t.Float, SECRET_COOKIE=t.String)\n env_vars = config(schema=schema)\n assert env_vars == {'DEBUG': True, VERSION: 0.1, SECRET_COOKIE=<......>}\n```\n\nOnce schema defined we can pass variables throw env\n\n```shell\nDEBUG=1 VERSION=1.0 SECRET_COOKIE=yo python app.py\n```\n\nCmd flags\n```shell\npython app.py --debug=1 version=1.0\n```\n\nOr even both\n\n```shell\nexport VERSION=1.0\nexport SECRET_COOKIE=yo\npython app.py --debug=2\n```", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "configus", "package_url": "https://pypi.org/project/configus/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/configus/", "project_urls": null, "release_url": "https://pypi.org/project/configus/0.1.4/", "requires_dist": null, "requires_python": "", "summary": "Configus - a declarative spec for configuration", "version": "0.1.4" }, "last_serial": 2986416, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "11a9c8efcdad853af8aacb9144129be8", "sha256": "6d5a984ca0dcbcb04681d0c4343a448e9c606bb83b2576dd3354a3149f1c4f94" }, "downloads": -1, "filename": "configus-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "11a9c8efcdad853af8aacb9144129be8", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4793, "upload_time": "2017-03-15T23:38:00", "url": "https://files.pythonhosted.org/packages/ee/0f/a84496430f9443aa174f2ade33e3b0aac69ffb9852ea712270ef08bba8c4/configus-0.1.0-py2.py3-none-any.whl" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "9d6e1305594579d89f17037da5a90a6e", "sha256": "4e8ff9be1c741e3e10f1a491dad70afff644b7b07668c135356df9f652bd0923" }, "downloads": -1, "filename": "configus-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9d6e1305594579d89f17037da5a90a6e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5136, "upload_time": "2017-03-16T00:02:09", "url": "https://files.pythonhosted.org/packages/f6/1e/e0b1af65e73752f5896f2a4c5924864e2d3436645a8eb556cb3b93c0edb2/configus-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0d1c9d34303c2ab64d0d7a4acff21157", "sha256": "2af161444d98e0a338e1332aa3c4b8c44d1c5829210cbb4a2dce6c0f4572cb02" }, "downloads": -1, "filename": "configus-0.1.1.tar.gz", "has_sig": false, "md5_digest": "0d1c9d34303c2ab64d0d7a4acff21157", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1972, "upload_time": "2017-03-16T00:02:35", "url": "https://files.pythonhosted.org/packages/51/6e/49823bda9b3c4e75ee9ed5a01a5dd8902a7a361393cedb87ba8bf9a11c33/configus-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "1f35757a758e66856803e5489b5f0eca", "sha256": "9c4f2c17a34f9c38c6ae026f8448a61c41e92696f62502182a19cf1fe0a9ced7" }, "downloads": -1, "filename": "configus-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "1f35757a758e66856803e5489b5f0eca", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5450, "upload_time": "2017-05-23T00:14:41", "url": "https://files.pythonhosted.org/packages/63/8f/eac2d379322756cd6f604f06acacfca228777e2627d26563e112fcd29210/configus-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "da816851be22ce657b958e1dbcf70b77", "sha256": "1e64f423a924d292cc7e71d62844241a8519547f975d21efe18cf1d76c57dd6e" }, "downloads": -1, "filename": "configus-0.1.2.tar.gz", "has_sig": false, "md5_digest": "da816851be22ce657b958e1dbcf70b77", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2199, "upload_time": "2017-05-23T00:14:29", "url": "https://files.pythonhosted.org/packages/9a/c1/78e6f15707d6259c359e18d658606cc95afa09742d983fd4ea3a7ef260fd/configus-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "64337739ccd3f33d33ccf78e7ff04b89", "sha256": "62940293c868ae76e70f2ea6425e0eaaf28e33a27fc2c7e5183280dcfb82ab79" }, "downloads": -1, "filename": "configus-0.1.3.tar.gz", "has_sig": false, "md5_digest": "64337739ccd3f33d33ccf78e7ff04b89", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2804, "upload_time": "2017-06-13T00:00:00", "url": "https://files.pythonhosted.org/packages/e6/4b/e068c29b6c33b0ee7bb5c10486e95036472c9c0092c91a2df3af2816d9ca/configus-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "1055c53c25047e8b4098569e6b94dd08", "sha256": "dc325fd47f7f9ef28ab03fcb35d4f4d26c3b500bb20e6ab206a59b99d6648041" }, "downloads": -1, "filename": "configus-0.1.4.tar.gz", "has_sig": false, "md5_digest": "1055c53c25047e8b4098569e6b94dd08", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3103, "upload_time": "2017-06-29T01:37:59", "url": "https://files.pythonhosted.org/packages/6b/ed/e89d2ae969c22e6ce23359ab339fab40f18dc52a667c218ade758912fceb/configus-0.1.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1055c53c25047e8b4098569e6b94dd08", "sha256": "dc325fd47f7f9ef28ab03fcb35d4f4d26c3b500bb20e6ab206a59b99d6648041" }, "downloads": -1, "filename": "configus-0.1.4.tar.gz", "has_sig": false, "md5_digest": "1055c53c25047e8b4098569e6b94dd08", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3103, "upload_time": "2017-06-29T01:37:59", "url": "https://files.pythonhosted.org/packages/6b/ed/e89d2ae969c22e6ce23359ab339fab40f18dc52a667c218ade758912fceb/configus-0.1.4.tar.gz" } ] }