{ "info": { "author": "Fran\u00e7ois Schmidts", "author_email": "francois@schmidts.fr", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Programming Language :: Python :: 3" ], "description": "[![Build Status](https://travis-ci.org/jaesivsm/the_conf.svg?branch=master)](https://travis-ci.org/jaesivsm/the_conf) [![Coverage Status](https://coveralls.io/repos/github/jaesivsm/the_conf/badge.svg?branch=master)](https://coveralls.io/github/jaesivsm/the_conf?branch=master)\n\nFrom [this](http://sametmax.com/les-plus-grosses-roues-du-monde/)\n\n Une bonne lib de conf doit:\n\n * Offrir une API standardis\u00e9e pour d\u00e9finir les param\u00e8tres qu\u2019attend son programme sous la forme d\u2019un sch\u00e9ma de donn\u00e9es.\n * Permettre de g\u00e9n\u00e9rer depuis ce sch\u00e9ma les outils de parsing de la ligne de commande et des variables d\u2019env.\n * Permettre de g\u00e9n\u00e9rer depuis ce sch\u00e9ma des validateurs pour ces sch\u00e9mas.\n * Permettre de g\u00e9n\u00e9rer des API pour modifier la conf.\n * Permettre de g\u00e9n\u00e9rer des UIs pour modifier la conf.\n * S\u00e9parer la notion de configuration du programme des param\u00e8tres utilisateurs.\n * Pouvoir marquer des settings en lecture seule, ou des permissions sur les settings.\n * Notifier le reste du code (ou des services) qu\u2019une valeur \u00e0 \u00e9t\u00e9 modifi\u00e9e. Dispatching, quand tu nous tiens\u2026\n * Charger les settings depuis une source compatible (bdd, fichier, api, service, etc).\n * Permettre une hi\u00e9rarchie de confs, avec une conf principale, des enfants, des enfants d\u2019enfants, etc. et la r\u00e9cup\u00e9ration de la valeur qui cascade le long de cette hi\u00e9rarchie. Un code doit pouvoir plugger sa conf dans une branche de l\u2019arbre \u00e0 la vol\u00e9e.\n * Fournir un service de settings pour les architectures distribu\u00e9es.\n * Etre quand m\u00eame utile et facile pour les tous petits scripts.\n * Auto documentation des settings.\n\n\nBeforehand: for more clarity ```the_conf``` will designate the current program, its configuration will be referred to as the _meta conf_ and the configurations it will absorb (files / cmd line / environ) simply as the _configurations_.\n\n# 1. read the _meta conf_\n\n```the_conf``` should provide a singleton.\nOn instantiation the singleton would read the _meta conf_ (its configuration) from a file. YML and JSON will be considered first. This file will provide names, types, default values and if needed validator for options.\n\n```the_conf``` will the validate the conf file. For each config value :\n * if value has _choices_ and _default value_, _default value_ has to be among _choices_.\n * if the value is nested, a node can't hold anything else than values\n * _required_ values can't have default\n\n# 2. read the _configurations_\n\nOnce the _meta conf_ has been processed, ```the_conf``` will assemble all values at its reach from several sources.\nThree types are to be considered:\n * files (again YML/JSON but maybe also later ini)\n * command line\n * environ\nin this order of importance. This order must be itself overridable. ```the_conf``` must provide a backend for values from the configuration to be reached.\n\n```python\nthe_conf.load('path/to/meta/conf.yml')\nthe_conf.nested.value\n> 1\n```\n\nUpon reading _configurations_, ```the_conf``` will validate gathered values.\n * _configurations_ file type will be guessed from file extention (yaml / yml, json, ini), anything else must raise an error. Parsing errors won't also be silenced. Although, missing won't be an issue as long as all required values are gathered.\n * values must be in the type there declared in or cast to it without error\n * required values must be provided\n * if a value is configured with _choices_, the gathered value must be in _choices_\n\nThe first writable, readable available _configuration_ file found will be set as the main. Values will be edited on it but values from it will still be overridden according to the priorities. A warning should be issued if the main _configuration_ is overriddable.\nIf no suitable file is found, a warning should also be issued ; edition will be impossible and will generate an error.\n\n# 3. generate the _configurations_\n\nProvide an API to list and validate values needed from the _configurations_ (the required ones).\nProvide a command line UI to process that list to let a user generate a _configuration_ file.\n\n# 4. write the _configurations_\n\nDepending on the permissions set in the _meta conf_, ```the_conf``` must allow to edit the values in the configuration file set as _main_ on read phase.\nIf editing a value which will be ignored for being overriden, a warning must be issued.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jaesivsm/the_conf/", "keywords": "conf configuration json yaml command line environ", "license": "GPLv3", "maintainer": "Fran\u00e7ois Schmidts", "maintainer_email": "francois@schmidts.fr", "name": "the-conf", "package_url": "https://pypi.org/project/the-conf/", "platform": "", "project_url": "https://pypi.org/project/the-conf/", "project_urls": { "Homepage": "https://github.com/jaesivsm/the_conf/" }, "release_url": "https://pypi.org/project/the-conf/0.0.12/", "requires_dist": null, "requires_python": "", "summary": "Config build from multiple sources", "version": "0.0.12" }, "last_serial": 3954470, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "619a3f9033ea8d2d459d43252b0e5ac3", "sha256": "61bc8fc4026e014ef90b91c6023b2d3deac7189806bf655261c60843ad2c821f" }, "downloads": -1, "filename": "the_conf-0.0.1.tar.gz", "has_sig": false, "md5_digest": "619a3f9033ea8d2d459d43252b0e5ac3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5235, "upload_time": "2017-09-18T09:34:59", "url": "https://files.pythonhosted.org/packages/d9/db/8439ed448052170c3ee8fc11d283a3019b35ecb8ad1e2446ed21bf847432/the_conf-0.0.1.tar.gz" } ], "0.0.11": [ { "comment_text": "", "digests": { "md5": "158eb4956cafbee28442d884b3f5e2a9", "sha256": "342a7a3e9c1b43a089e2f76d49d145c96c118baa3cf32e307bfcc7fc7307faf6" }, "downloads": -1, "filename": "the_conf-0.0.11.tar.gz", "has_sig": false, "md5_digest": "158eb4956cafbee28442d884b3f5e2a9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7852, "upload_time": "2018-02-22T14:23:18", "url": "https://files.pythonhosted.org/packages/c4/ca/94e23abb9a1b645fd9f197bc49c243f0a2e7d27083c96008358aab9ba2fe/the_conf-0.0.11.tar.gz" } ], "0.0.12": [ { "comment_text": "", "digests": { "md5": "b1c43b1f3ff5cbef3469001f5406b3f8", "sha256": "022b4364592beb1b9540b0e623be0e0c6a359b7d9a8956b6e635a6afe3798988" }, "downloads": -1, "filename": "the_conf-0.0.12.tar.gz", "has_sig": false, "md5_digest": "b1c43b1f3ff5cbef3469001f5406b3f8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7410, "upload_time": "2018-06-12T16:50:19", "url": "https://files.pythonhosted.org/packages/19/bc/814f88b495b52680cfc72dcf897e521766e64f281118e60838211688eae3/the_conf-0.0.12.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "c17f2bbb8ca72a534020c76540abe3fc", "sha256": "bac1863237bf2f0e4a0f35b3893df3b3b1019da38888ece8d973d7631745e884" }, "downloads": -1, "filename": "the_conf-0.0.2.tar.gz", "has_sig": false, "md5_digest": "c17f2bbb8ca72a534020c76540abe3fc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5917, "upload_time": "2017-10-22T15:33:10", "url": "https://files.pythonhosted.org/packages/b8/36/87496744fb0093ce47cad33685e15b11094dc373e790642d2d388769a927/the_conf-0.0.2.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "de0c13ee35a29ccecb21f3866f679cb4", "sha256": "ca147320215a5c10b041b087c13231c7b2b2ed54faf0621e4873c7f94f091f83" }, "downloads": -1, "filename": "the_conf-0.0.4.tar.gz", "has_sig": false, "md5_digest": "de0c13ee35a29ccecb21f3866f679cb4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7736, "upload_time": "2017-11-28T17:54:33", "url": "https://files.pythonhosted.org/packages/cc/81/f4539f19714f7c6453b1111aa2d85f51d530c09e97ad063414129a66e73d/the_conf-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "f5d79d629ad5e11442bf0b170ea37c3d", "sha256": "aa0d5b7ccc173083ebf3c98ad913267407b92cbfc47446c3a8e3fcaa14805caa" }, "downloads": -1, "filename": "the_conf-0.0.5.tar.gz", "has_sig": false, "md5_digest": "f5d79d629ad5e11442bf0b170ea37c3d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7730, "upload_time": "2017-11-28T18:03:37", "url": "https://files.pythonhosted.org/packages/82/6e/645733a3bf7645a0aed9bce3a2507685d61d9487fd24ef34a5a2e1a43b3c/the_conf-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "e732d06536637b4d50265cb0681883d3", "sha256": "ed025bd72ec0dd887e0a93462f257c6f1d55f5bd00b15687ca34cc66608fa3c5" }, "downloads": -1, "filename": "the_conf-0.0.6.tar.gz", "has_sig": false, "md5_digest": "e732d06536637b4d50265cb0681883d3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7350, "upload_time": "2017-11-28T19:57:58", "url": "https://files.pythonhosted.org/packages/d1/eb/d1e783d9fb8d766278a333575443be0c164e8972fdef1f0b5665c03d72ae/the_conf-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "28ec519be4f790350d85d6bf09d36de4", "sha256": "cf9a5fc877b66c1dcbd0beeafbbde372acc781e666615e7a48b456b55dbe5cb9" }, "downloads": -1, "filename": "the_conf-0.0.7.tar.gz", "has_sig": false, "md5_digest": "28ec519be4f790350d85d6bf09d36de4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7385, "upload_time": "2017-11-29T21:59:39", "url": "https://files.pythonhosted.org/packages/e2/73/5f98f8fcba0444e5c9a0377c9abf2184460178d6cc195160eda0994a9fdd/the_conf-0.0.7.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "56b408a2760d50a9fa201761c05e221c", "sha256": "1e6506956e74d63f754386292d8e7e722bb3f6efe31259099f6c4fa6d935c9cb" }, "downloads": -1, "filename": "the_conf-0.0.8.tar.gz", "has_sig": false, "md5_digest": "56b408a2760d50a9fa201761c05e221c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7382, "upload_time": "2017-11-29T22:06:08", "url": "https://files.pythonhosted.org/packages/1b/f8/557e690f93270a2a37a2c1e3caac9404e00c96b59fba0c6ecabef3c2f66f/the_conf-0.0.8.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b1c43b1f3ff5cbef3469001f5406b3f8", "sha256": "022b4364592beb1b9540b0e623be0e0c6a359b7d9a8956b6e635a6afe3798988" }, "downloads": -1, "filename": "the_conf-0.0.12.tar.gz", "has_sig": false, "md5_digest": "b1c43b1f3ff5cbef3469001f5406b3f8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7410, "upload_time": "2018-06-12T16:50:19", "url": "https://files.pythonhosted.org/packages/19/bc/814f88b495b52680cfc72dcf897e521766e64f281118e60838211688eae3/the_conf-0.0.12.tar.gz" } ] }