{ "info": { "author": "Schlomo Schapiro", "author_email": "schlomo.schapiro@immobilienscout24.de", "bugtrack_url": null, "classifiers": [], "description": ".. image:: https://travis-ci.org/ImmobilienScout24/yamlreader.png?branch=master\n :alt: Travis build status image\n :align: left\n :target: https://travis-ci.org/ImmobilienScout24/yamlreader\n\n==========\nyamlreader\n==========\nMerge YAML data from a directory, a list of files or a file glob. With a\ndirectory, the YAML files (`*.yaml`) are sorted alphabetically. The YAML\nfiles are expected to contain a complex key-value structure and merged\nwith the following rules:\n\n* lists get appended\n* hashes get merged by key\n* scalars (numbers, strings) are overwritten\n* everything else will fail\n\nThe purpose is to allow several YAML files instead of a single YAML file. We\nuse it to help our software read configuration data from an arbitrary amount\nof YAML files instead of a single YAML file.\n\nRead the unit test to see some examples.\n\nBuilding and Installation\n=========================\nUsing pip\n---------\n**yamlreader** is available with ``pip``:\n::\n\n pip install yamlreader\n\nManual build and installation\n-----------------------------\nIf you want to make changes or use e.g. ``fpm`` for packaging this, you need to\nprepare the development environment to make further steps.\n\nPrepare the source\n~~~~~~~~~~~~~~~~~~\n::\n\n git clone https://github.com/ImmobilienScout24/yamlreader.git\n cd yamlreader\n virtualenv venv\n source venv/bin/activate\n pip install pybuilder\n pyb install_dependencies\n\nRunning tests\n~~~~~~~~~~~~~\n::\n\n pyb verify\n\nGenerating a setup.py\n~~~~~~~~~~~~~~~~~~~~~\n::\n\n pyb\n cd target/dist/yamlreader-\n ./setup.py \n\nRunning\n=======\nThe package installs a command line script ``yamlreader`` that can be used to\nread one or many YAML files and dump the merge result as a YAML document.\n\nUse it in your software\n=======================\nWherever you had been using the ``safe_load`` function of\n`PyYAML `_ to read a single YAML file you can use\nthe ``yamlreader.yaml_load`` function as a replacement to read all ``*.yaml``\nfiles in a directory::\n\n from yamlreader import yaml_load\n\n defaultconfig = {\n \"loglevel\" : \"error\",\n \"some\" : \"value\"\n }\n\n config = yaml_load(\"/etc/myapp\", defaultconfig)\n\nyaml_load\n---------\n::\n\n def yaml_load(source,defaultdata=None):\n \"\"\"merge YAML data from files found in source\n\n Always returns a dict. The YAML files are expected to contain some kind of\n key:value structures, possibly deeply nested. When merging, lists are\n appended and dict keys are replaced. The YAML files are read with the\n yaml.safe_load function.\n\n source can be a file, a dir, a list/tuple of files or a string containing\n a glob expression (with ?*[]).\n\n For a dir all *.yaml files will be read in alphabetical order.\n\n defaultdata can be used to initialize the data.\n \"\"\"", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ImmobilienScout24/yamlreader", "keywords": "", "license": "Apache License 2.0", "maintainer": "", "maintainer_email": "", "name": "yamlreader", "package_url": "https://pypi.org/project/yamlreader/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/yamlreader/", "project_urls": { "Homepage": "https://github.com/ImmobilienScout24/yamlreader" }, "release_url": "https://pypi.org/project/yamlreader/3.0.4/", "requires_dist": null, "requires_python": "", "summary": "Merge YAML data from given files, dir or file glob", "version": "3.0.4" }, "last_serial": 2582545, "releases": { "3": [ { "comment_text": "", "digests": { "md5": "12d42bd9b2bcd1562a5a4e401622a6fb", "sha256": "2374a90055b100dcb2d56839e79d0cb68563c12cc306eeb30e448ba17ee5442a" }, "downloads": -1, "filename": "yamlreader-3-py2.7.egg", "has_sig": false, "md5_digest": "12d42bd9b2bcd1562a5a4e401622a6fb", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 5927, "upload_time": "2015-06-23T11:31:16", "url": "https://files.pythonhosted.org/packages/0a/8c/d56273b0b2053a976fd745b9f942f86aa16181a9025134f9b9be8436f8f9/yamlreader-3-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "12b1e39d52da5b0f202a245000291c4c", "sha256": "cf283bb6079a281d3c8d8e0b6a2b963f985ca28c3581fff902e9e0178e58784c" }, "downloads": -1, "filename": "yamlreader-3-py2-none-any.whl", "has_sig": false, "md5_digest": "12b1e39d52da5b0f202a245000291c4c", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 4408, "upload_time": "2015-06-23T11:31:19", "url": "https://files.pythonhosted.org/packages/58/a1/7cd2466b1307a30a14ba572f9c0b61fc3fc23f697e98ce1b3552699d7388/yamlreader-3-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6e797aeaa6f61725e81dcdc10ad35794", "sha256": "c9615778ac6846cc25376474531fc2f9136100fe5523317a34a0b495fb4efbcc" }, "downloads": -1, "filename": "yamlreader-3.tar.gz", "has_sig": false, "md5_digest": "6e797aeaa6f61725e81dcdc10ad35794", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5474, "upload_time": "2015-06-23T11:31:13", "url": "https://files.pythonhosted.org/packages/fc/d0/bb0ca3add150a2b54ac49f7fb894475b3d9896ea2af8812af0529299d33a/yamlreader-3.tar.gz" } ], "3.0.0": [ { "comment_text": "", "digests": { "md5": "8d6948cedf72d9b9baef9d692ecc9697", "sha256": "a96ea3a8ed49591f7a973ad9ba1a34ef30ed9f281822919db2cd2cd7ecebada7" }, "downloads": -1, "filename": "yamlreader-3.0.0-py2.7.egg", "has_sig": false, "md5_digest": "8d6948cedf72d9b9baef9d692ecc9697", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 7054, "upload_time": "2015-07-09T13:01:40", "url": "https://files.pythonhosted.org/packages/d1/27/5a324ff13287ab31d3d583c35f9f70855ef92df011ffec659f353fd26119/yamlreader-3.0.0-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "8d2b9f50cdc63af6cf366b1dc66ae810", "sha256": "f2df9ae4709ebb4dd89ce9bf40d3341a6bd3b59f089343fee77f8876de6fb4e9" }, "downloads": -1, "filename": "yamlreader-3.0.0-py2-none-any.whl", "has_sig": false, "md5_digest": "8d2b9f50cdc63af6cf366b1dc66ae810", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 6628, "upload_time": "2015-07-09T13:01:44", "url": "https://files.pythonhosted.org/packages/8f/0b/73b57b6a1af6c9cfd17b5c2cc833deebc88f7fa85391888e219f0053ba53/yamlreader-3.0.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ae6a58d8aae1996b24bef641bbb39e2f", "sha256": "4c39ae06600bad4f65a8a4be213f4387bfdc20ff9c7dfd176b8d2e8dd8c8e25e" }, "downloads": -1, "filename": "yamlreader-3.0.0.tar.gz", "has_sig": false, "md5_digest": "ae6a58d8aae1996b24bef641bbb39e2f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5762, "upload_time": "2015-07-09T13:01:37", "url": "https://files.pythonhosted.org/packages/99/ac/118bc83072a400399986d654b6607ad679b0dc3b1756de6927f8fea1f586/yamlreader-3.0.0.tar.gz" } ], "3.0.1": [ { "comment_text": "", "digests": { "md5": "924fc92ae11b49f93d61d19a13ea5e2d", "sha256": "be0a267fb8995e34e45c087badcff689cb2a7876c31db7358d65d85b5ba4ee1b" }, "downloads": -1, "filename": "yamlreader-3.0.1-py2.7.egg", "has_sig": false, "md5_digest": "924fc92ae11b49f93d61d19a13ea5e2d", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 7275, "upload_time": "2015-08-28T11:23:52", "url": "https://files.pythonhosted.org/packages/09/8f/4ddf114dda45191b7d2064c0e1e92b49456ad4f3bc5936dcd6a0c0a508e5/yamlreader-3.0.1-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "8bd80cb246cc936f58a04680a6736e46", "sha256": "f54fc40fe358bf5c8407a15d21a2e64ff92aa664c27609a2452ae05ea54accf8" }, "downloads": -1, "filename": "yamlreader-3.0.1-py2-none-any.whl", "has_sig": false, "md5_digest": "8bd80cb246cc936f58a04680a6736e46", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 6698, "upload_time": "2015-08-28T11:23:55", "url": "https://files.pythonhosted.org/packages/33/41/9bd4cb0fdfc0ef186487724fb4abb13e5866d8358ff5cdceca925d90207b/yamlreader-3.0.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3d6ed5d4667a38c9edc20e7c9c6b8441", "sha256": "7a12335b49601084b4778854366c66a60ecb2fabf659ed86ceb343e04610250f" }, "downloads": -1, "filename": "yamlreader-3.0.1.tar.gz", "has_sig": false, "md5_digest": "3d6ed5d4667a38c9edc20e7c9c6b8441", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7723, "upload_time": "2015-08-28T11:23:49", "url": "https://files.pythonhosted.org/packages/b2/08/e352fb9b4d34d3ec4852d9302ebf573c904466b60593dafef85735d8214d/yamlreader-3.0.1.tar.gz" } ], "3.0.2": [ { "comment_text": "", "digests": { "md5": "46e29d1004d7b9db97545585d1843680", "sha256": "44247c6b78dfb6866715c206c542dffd2b114d710c1b33b7735ef3f756cfa2eb" }, "downloads": -1, "filename": "yamlreader-3.0.2.tar.gz", "has_sig": false, "md5_digest": "46e29d1004d7b9db97545585d1843680", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4555, "upload_time": "2015-09-22T17:42:01", "url": "https://files.pythonhosted.org/packages/84/f0/3f773cbf21b9c632992ad59e503c174a97f6d22e3e17612167a7370d45dc/yamlreader-3.0.2.tar.gz" } ], "3.0.3": [ { "comment_text": "", "digests": { "md5": "97fd09200423ac33f4f1c27e133e07d9", "sha256": "89606cc64ada2b4f729bb023a1880b96577e011ab220fcf1d1cffcebcf980102" }, "downloads": -1, "filename": "yamlreader-3.0.3.tar.gz", "has_sig": false, "md5_digest": "97fd09200423ac33f4f1c27e133e07d9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4615, "upload_time": "2017-01-18T14:49:00", "url": "https://files.pythonhosted.org/packages/58/e7/7618592c8ecc616959d40faec32fb13349dbe67b60c345313121d023eb78/yamlreader-3.0.3.tar.gz" } ], "3.0.4": [ { "comment_text": "", "digests": { "md5": "542179b5b5bedae941245b8b673119db", "sha256": "765688036d57104ac26e4500ab088d42f4f2d06687ce3daa26543d7ae38c2470" }, "downloads": -1, "filename": "yamlreader-3.0.4.tar.gz", "has_sig": false, "md5_digest": "542179b5b5bedae941245b8b673119db", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4611, "upload_time": "2017-01-18T15:14:02", "url": "https://files.pythonhosted.org/packages/84/4b/3af5480c26b3235dcd0984b9664b48115c2308c8c4f22e7162322be4ec0f/yamlreader-3.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "542179b5b5bedae941245b8b673119db", "sha256": "765688036d57104ac26e4500ab088d42f4f2d06687ce3daa26543d7ae38c2470" }, "downloads": -1, "filename": "yamlreader-3.0.4.tar.gz", "has_sig": false, "md5_digest": "542179b5b5bedae941245b8b673119db", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4611, "upload_time": "2017-01-18T15:14:02", "url": "https://files.pythonhosted.org/packages/84/4b/3af5480c26b3235dcd0984b9664b48115c2308c8c4f22e7162322be4ec0f/yamlreader-3.0.4.tar.gz" } ] }