{ "info": { "author": "_Frky", "author_email": "francky.dg@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Topic :: Software Development :: Testing" ], "description": "Confiture\n=========\n\n Funny fact: confiture looks like configure.\n\nConfiture, what's that?\n-----------------------\n\n[STRIKEOUT:Jam typically contains both the juice and flesh of a fruit or\nvegetable, although some cookbooks define it as a cooked and jelled\npuree. The term \"jam\" refers to a product made of whole fruit cut into\npieces or crushed, then heated with water and sugar to activate its\npectin before being put into containers.]\n\nConfiture is a small piece of code to test a ``yaml`` configuration\nfile. By test we mean check that some required fields are indeed set.\n\nInstallation\n------------\n\n::\n\n spread confiture\n\nOh really? - No.\n\n::\n\n pip install confiture\n\nOh really? - Nope, pip name ``confiture`` was already used.\n\n.. code:: bash\n\n pip install spread-confiture\n\nOh really? - Hell yeah.\n\nRequirements\n~~~~~~~~~~~~\n\nThis project requires ``pyyaml`` to parse ``yaml`` files.\n\nUsage\n-----\n\nTemplate file\n~~~~~~~~~~~~~\n\nA template file is a file that describes the fields that we want to\ncheck when parsing a configuration file. It is also written in ``yaml``,\nwith the following scheme:\n\n.. code:: yaml\n\n foo:\n bar: \"\"\n foobar:\n foo: \"\"\n bar: \"\"\n\n bar: \"\"\n\nA configuration file is consistant relatively to the template file if\nevery required field specified by the template are set. Note that the\nconfiguration can also set other fields that are not specified by the\ntemplate.\n\nCreate a ``Confiture`` object\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nTo create a ``Confiture`` object relatively to a given template file:\n\n.. code:: python\n\n from confiture import Confiture\n # conf pour confiture ou configration ?\n conf = Confiture(\"examples/templates/confiture.yaml\")\n\nParse a configuration file\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nOnce the ``Confiture`` object is created, we can test ``yaml``\nconfiguration files:\n\n.. code:: python\n\n # Simple test\n conf.check(\"examples/config/blueberry_ok.yaml\")\n # Test et r\u00e9cup\u00e9ration du contenu du fichier sous forme de dictionnaire\n config = conf.check_and_get(\"examples/config/blueberry_ok.yaml\")\n\nIf the configuration file is not consistant with the template, a\n``ConfigFileError`` exception is raised.\n\nExample\n-------\n\nCode\n~~~~\n\n.. code:: python\n\n from confiture import Confiture, ConfigFileError\n\n print \"[*] loading template\"\n confiture = Confiture(\"examples/templates/confiture.yaml\")\n print \"[*] checking required files for blueberry\"\n try:\n confiture.check(\"examples/config/blueberry_ok.yaml\")\n print \"[*] blueberry file is correct\"\n except ConfigFileError as e:\n print e.message\n print \"[*] checking required files for banana\"\n try:\n confiture.check(\"examples/config/banana_ko.yaml\")\n print \"[*] banana file is correct\"\n except ConfigFileError as e:\n print e.message\n\nOutput\n~~~~~~\n\n::\n\n (confiture) > python ./example.py \n [*] loading template\n [*] checking required files for blueberry\n [*] blueberry file is correct\n [*] checking required files for banana\n *** fruit field not found -- aborting\n\nFAQ\n---\n\n**How did you get the idea to do (some) Confiture?**\n\n*It was a forbidden morning of September, breakfast time. At the exact\nmoment when I started speading Nutella on my toast...*\n\n**Why a documentation?**\n\n*Because a project without documentation is like a Confiture without\nbananas.*\n\n**Why a documentation THAT long?**\n\n*Because documentation is like banana in Confiture, the more there is\nthe better it tastes.*\n\n**Why a documentation THAT long for a project this simple?**\n\n*Because now I can say that once in my life I wrote a documentation\nlonger than the code itself.*", "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/Frky/confiture", "keywords": "yaml configuration config required fields template", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "spread-confiture", "package_url": "https://pypi.org/project/spread-confiture/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/spread-confiture/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/Frky/confiture" }, "release_url": "https://pypi.org/project/spread-confiture/0.17.3rc1/", "requires_dist": null, "requires_python": null, "summary": "A checker for required fields in yaml files", "version": "0.17.3rc1" }, "last_serial": 1911303, "releases": { "0.17.1rc1": [ { "comment_text": "", "digests": { "md5": "64b1782d6e583767a6c71044bbd13ff5", "sha256": "61c5713870d4c90458cdcf401af7508c8124936bd5c8e632451b4b1b0b9e5c89" }, "downloads": -1, "filename": "spread-confiture-0.17.1rc1.tar.gz", "has_sig": false, "md5_digest": "64b1782d6e583767a6c71044bbd13ff5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3442, "upload_time": "2016-01-06T09:05:22", "url": "https://files.pythonhosted.org/packages/77/9d/8e38adbe4cf72fc8cc83854b8e595d806021472977d8fe715089a89d3d23/spread-confiture-0.17.1rc1.tar.gz" } ], "0.17.1rc2": [ { "comment_text": "", "digests": { "md5": "be9a0ed8efa5b056216160a93bea2c8a", "sha256": "87f18b34cd29ee4b6c1651301e0b06d94e6ebfebdec919e31f7d9f4614241593" }, "downloads": -1, "filename": "spread-confiture-0.17.1rc2.tar.gz", "has_sig": false, "md5_digest": "be9a0ed8efa5b056216160a93bea2c8a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3461, "upload_time": "2016-01-06T09:32:44", "url": "https://files.pythonhosted.org/packages/c6/1e/32c82943172deb486401dc900ee6cba2b22d0c8c2566b9cc1d63a4d47547/spread-confiture-0.17.1rc2.tar.gz" } ], "0.17.1rc3": [ { "comment_text": "", "digests": { "md5": "afa2f171a8ea4712d426e131c17bc4ed", "sha256": "66f08dc24484dc3445b0b32e0dbce5e8e5d7c9b67de0cf13f1099b87a2fe4f06" }, "downloads": -1, "filename": "spread-confiture-0.17.1rc3.tar.gz", "has_sig": false, "md5_digest": "afa2f171a8ea4712d426e131c17bc4ed", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3452, "upload_time": "2016-01-06T10:12:07", "url": "https://files.pythonhosted.org/packages/1f/e3/f5e336e38a5d4cbae08e607663c582f2c2e5765d6ed243823293a0faf375/spread-confiture-0.17.1rc3.tar.gz" } ], "0.17.2rc2": [ { "comment_text": "", "digests": { "md5": "21e032d3da666644c0caa23626505263", "sha256": "3495ce283d6fe5dcc343822510cf54741d55f443a3f4eac5a10218a9405dc774" }, "downloads": -1, "filename": "spread-confiture-0.17.2rc2.tar.gz", "has_sig": false, "md5_digest": "21e032d3da666644c0caa23626505263", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3455, "upload_time": "2016-01-06T10:11:47", "url": "https://files.pythonhosted.org/packages/32/91/f1f593d3f75778c54c61671cd7a87b3e423f683ff40a984226f8098db43c/spread-confiture-0.17.2rc2.tar.gz" } ], "0.17.3rc1": [ { "comment_text": "", "digests": { "md5": "bee59e8c313aa07a8356d9bc67d8e3bf", "sha256": "7b0030dd3078a2fb18f5802c41844cba225c87b36e3295ccf188710ea56e8de4" }, "downloads": -1, "filename": "spread-confiture-0.17.3rc1.tar.gz", "has_sig": false, "md5_digest": "bee59e8c313aa07a8356d9bc67d8e3bf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3513, "upload_time": "2016-01-14T09:23:07", "url": "https://files.pythonhosted.org/packages/a3/11/6805e7b75b08e37b03d96204e7e380bdb8e88378cd98b9923dbc8ec93f38/spread-confiture-0.17.3rc1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "bee59e8c313aa07a8356d9bc67d8e3bf", "sha256": "7b0030dd3078a2fb18f5802c41844cba225c87b36e3295ccf188710ea56e8de4" }, "downloads": -1, "filename": "spread-confiture-0.17.3rc1.tar.gz", "has_sig": false, "md5_digest": "bee59e8c313aa07a8356d9bc67d8e3bf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3513, "upload_time": "2016-01-14T09:23:07", "url": "https://files.pythonhosted.org/packages/a3/11/6805e7b75b08e37b03d96204e7e380bdb8e88378cd98b9923dbc8ec93f38/spread-confiture-0.17.3rc1.tar.gz" } ] }