{ "info": { "author": "Raphael Pierzina", "author_email": "raphael@hackebrot.de", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy" ], "description": "# poyo\n\nA lightweight YAML Parser for Python. \ud83d\udc13\n\n**poyo** does not allow deserialization of arbitrary Python objects. Supported\ntypes are `str`, `bool`, `int`, `float`, `NoneType` as well as `dict` and\n`list` values.\n\n\u26a0\ufe0f Please note that poyo supports only a chosen subset of the YAML format\nthat is required to parse [cookiecutter user configuration\nfiles][cookiecutterrc]. poyo does not have support for serializing into YAML\nand is not compatible with JSON.\n\n[cookiecutterrc]: https://cookiecutter.readthedocs.io/en/latest/advanced/user_config.html\n\n## Installation\n\npoyo is available on [PyPI][PyPI] for Python versions 2.7 and newer and can\nbe installed with [pip][pip]:\n\n```text\npip install poyo\n```\n\n[PyPI]: https://pypi.org/project/poyo/\n[pip]: https://pypi.org/project/pip/\n\nThis package does not have any additional requirements. \ud83d\udce6\n\n## Usage\n\npoyo comes with a ``parse_string()`` function, to load utf-8 encoded string\ndata into a Python dict.\n\n```python\nimport codecs\nimport logging\n\nfrom poyo import parse_string, PoyoException\n\nlogging.basicConfig(level=logging.DEBUG)\n\nwith codecs.open(\"tests/foobar.yml\", encoding=\"utf-8\") as ymlfile:\n ymlstring = ymlfile.read()\n\ntry:\n config = parse_string(ymlstring)\nexcept PoyoException as exc:\n logging.error(exc)\nelse:\n logging.debug(config)\n```\n\n## Example\n\n### Input YAML string\n\n```yaml\n---\ndefault_context: # foobar\n greeting: \u3053\u3093\u306b\u3061\u306f\n email: \"raphael@hackebrot.de\"\n docs: true\n\n gui: FALSE\n 123: 456.789\n # comment\n # allthethings\n 'some:int': 1000000\n foo: \"hallo #welt\" #Inline comment :)\n longtext: >\n This is a multiline string.\n It can contain all manners of characters.\n\n Single line breaks are ignored,\n but blank linkes cause line breaks.\n trueish: Falseeeeeee\n blog : raphael.codes\n relative-root: / # web app root path (default: '')\n lektor: 0.0.0.0:5000 # local build\n doc_tools:\n # docs or didn't happen\n - mkdocs\n - 'sphinx'\n\n - null\n # \u4eca\u65e5\u306f\nzZz: True\nNullValue: Null\n\n# Block\n# Comment\n\nHello World:\n # See you at EuroPython\n null: This is madness # yo\n gh: https://github.com/{0}.git\n\"Yay #python\": Cool!\n```\n\n### Output Python dict\n\n```python\n{\n u\"default_context\": {\n u\"greeting\": u\"\u3053\u3093\u306b\u3061\u306f\",\n u\"email\": u\"raphael@hackebrot.de\",\n u\"docs\": True,\n u\"gui\": False,\n u\"lektor\": \"0.0.0.0:5000\",\n u\"relative-root\": \"/\",\n 123: 456.789,\n u\"some:int\": 1000000,\n u\"foo\": u\"hallo #welt\",\n u\"longtext\": (\n u\"This is a multiline string. It can contain all \"\n u\"manners of characters.\\nSingle line breaks are \"\n u\"ignored, but blank linkes cause line breaks.\\n\"\n ),\n u\"trueish\": u\"Falseeeeeee\",\n u\"blog\": u\"raphael.codes\",\n u\"doc_tools\": [u\"mkdocs\", u\"sphinx\", None],\n },\n u\"zZz\": True,\n u\"NullValue\": None,\n u\"Hello World\": {\n None: u\"This is madness\",\n u\"gh\": u\"https://github.com/{0}.git\",\n },\n u\"Yay #python\": u\"Cool!\",\n}\n```\n\n## Logging\n\npoyo follows the recommendations for [logging in a library][logging], which\nmeans it does not configure logging itself. Its root logger is named ``poyo``\nand the names of all its children loggers track the package/module hierarchy.\npoyo logs to a ``NullHandler`` and solely on ``DEBUG`` level.\n\nIf your application configures logging and allows debug messages to be shown,\nyou will see logging when using poyo. The log messages indicate which parser\nmethod is used for a given string as the parser deseralizes the config. You\ncan remove all logging from poyo in your application by setting the log level\nof the ``poyo`` logger to a value higher than ``DEBUG``.\n\n[logging]: https://docs.python.org/3/howto/logging.html#configuring-logging-for-a-library\n\n### Disable Logging\n\n```python\nimport logging\n\nlogging.getLogger(\"poyo\").setLevel(logging.WARNING)\n```\n\n### Example Debug Logging Config\n\n```python\nimport logging\nfrom poyo import parse_string\n\nlogging.basicConfig(level=logging.DEBUG)\n\nCONFIG = \"\"\"\n---\ndefault_context: # foobar\n greeting: \u3053\u3093\u306b\u3061\u306f\n gui: FALSE\n doc_tools:\n # docs or didn't happen\n - mkdocs\n - 'sphinx'\n 123: 456.789\n\"\"\"\n\nparse_string(CONFIG)\n```\n\n### Example Debug Logging Messages\n\n```text\nDEBUG:poyo.parser:parse_blankline <- \\n\nDEBUG:poyo.parser:parse_blankline -> IGNORED\nDEBUG:poyo.parser:parse_dashes <- ---\\n\nDEBUG:poyo.parser:parse_dashes -> IGNORED\nDEBUG:poyo.parser:parse_section <- default_context: # foobar\\n\nDEBUG:poyo.parser:parse_str <- default_context\nDEBUG:poyo.parser:parse_str -> default_context\nDEBUG:poyo.parser:parse_section ->
\nDEBUG:poyo.parser:parse_simple <- greeting: \\u3053\\u3093\\u306b\\u3061\\u306f\\n\nDEBUG:poyo.parser:parse_str <- greeting\nDEBUG:poyo.parser:parse_str -> greeting\nDEBUG:poyo.parser:parse_str <- \\u3053\\u3093\\u306b\\u3061\\u306f\nDEBUG:poyo.parser:parse_str -> \\u3053\\u3093\\u306b\\u3061\\u306f\nDEBUG:poyo.parser:parse_simple -> \nDEBUG:poyo.parser:parse_simple <- gui: FALSE\\n\nDEBUG:poyo.parser:parse_str <- gui\nDEBUG:poyo.parser:parse_str -> gui\nDEBUG:poyo.parser:parse_false <- FALSE\nDEBUG:poyo.parser:parse_false -> False\nDEBUG:poyo.parser:parse_simple -> \nDEBUG:poyo.parser:parse_list <- doc_tools:\\n # docs or didn't happen\\n - mkdocs\\n - 'sphinx'\\n\nDEBUG:poyo.parser:parse_str <- mkdocs\nDEBUG:poyo.parser:parse_str -> mkdocs\nDEBUG:poyo.parser:parse_str <- 'sphinx'\nDEBUG:poyo.parser:parse_str -> sphinx\nDEBUG:poyo.parser:parse_str <- doc_tools\nDEBUG:poyo.parser:parse_str -> doc_tools\nDEBUG:poyo.parser:parse_list -> \nDEBUG:poyo.parser:parse_simple <- 123: 456.789\\n\nDEBUG:poyo.parser:parse_int <- 123\nDEBUG:poyo.parser:parse_int -> 123\nDEBUG:poyo.parser:parse_float <- 456.789\nDEBUG:poyo.parser:parse_float -> 456.789\nDEBUG:poyo.parser:parse_simple -> \nDEBUG:poyo.parser:parse_simple <- docs: true\\n\nDEBUG:poyo.parser:parse_str <- docs\nDEBUG:poyo.parser:parse_str -> docs\nDEBUG:poyo.parser:parse_true <- true\nDEBUG:poyo.parser:parse_true -> True\nDEBUG:poyo.parser:parse_simple -> \n```\n\n## About this project\n\nWe created this project to work around installation issues with a\n[cookiecutter][cookiecutter] version that depended on existing YAML parsers\nfor Python. For more information please check out this [GitHub issue][issue].\n\n[issue]: https://github.com/cookiecutter/cookiecutter/pull/621\n\n## Community\n\nWould you like to contribute to **poyo**? You're awesome! \ud83d\ude03\n\nPlease check out the [good first issue][good first issue] label for tasks,\nthat are good candidates for your first contribution to poyo. Your\ncontributions are greatly appreciated! Every little bit helps and credit will\nalways be given.\n\nEveryone interacting in the poyo project's codebases, issue trackers, chat\nrooms, and mailing lists is expected to follow the [PyPI Code of\nConduct][code of conduct].\n\nJoin the poyo [community][community]! \ud83c\udf0d\ud83c\udf0f\ud83c\udf0e\n\n[code of conduct]: https://www.pypa.io/en/latest/code-of-conduct/\n[community]: https://github.com/hackebrot/poyo/blob/master/COMMUNITY.md\n[good first issue]: https://github.com/hackebrot/poyo/labels/good%20first%20issue\n\n## License\n\nDistributed under the terms of the [MIT][MIT] license, poyo is free and open source\nsoftware.\n\n[MIT]: https://github.com/hackebrot/poyo/blob/master/LICENSE\n\n[cookiecutter]: https://github.com/cookiecutter/cookiecutter\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/hackebrot/poyo", "keywords": "YAML,parser,cookiecutter", "license": "MIT", "maintainer": "Raphael Pierzina", "maintainer_email": "raphael@hackebrot.de", "name": "poyo", "package_url": "https://pypi.org/project/poyo/", "platform": "", "project_url": "https://pypi.org/project/poyo/", "project_urls": { "Homepage": "https://github.com/hackebrot/poyo", "Issues": "https://github.com/hackebrot/poyo/issues", "Repository": "https://github.com/hackebrot/poyo" }, "release_url": "https://pypi.org/project/poyo/0.5.0/", "requires_dist": null, "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "summary": "A lightweight YAML Parser for Python. \ud83d\udc13", "version": "0.5.0" }, "last_serial": 5588900, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "689bcc3e2f8dcfd9dc1f72e639acb384", "sha256": "ec4e0815f6b522a4a9c7787cb4b9df0857d6cae995710ce8eb9a92373b528345" }, "downloads": -1, "filename": "poyo-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "689bcc3e2f8dcfd9dc1f72e639acb384", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8165, "upload_time": "2015-12-28T00:47:24", "url": "https://files.pythonhosted.org/packages/0d/ad/03a377ae42de131a284b235ec7df58cc6d5bfbfaa866fbdfbb76b4f2fef6/poyo-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2dfde0f2d1898bb91b2a78435efa1713", "sha256": "8dee3451477c7a31ca4e7ff5bd2efbc8e9fbff50d1b444ea3f986d4e5c9a1262" }, "downloads": -1, "filename": "poyo-0.1.0.tar.gz", "has_sig": false, "md5_digest": "2dfde0f2d1898bb91b2a78435efa1713", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6569, "upload_time": "2015-12-28T00:47:29", "url": "https://files.pythonhosted.org/packages/04/fb/c1bb04bafd93b355d1f57586b924730b2efc469de2b6cbd39baa7643c01a/poyo-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "be7193ef139af38ec0165b78acf6883c", "sha256": "375cbb6d8e0853a55488ada3f397f2dffd2099567dc0985adec4a917ba5578ea" }, "downloads": -1, "filename": "poyo-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "be7193ef139af38ec0165b78acf6883c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8942, "upload_time": "2016-04-13T19:46:19", "url": "https://files.pythonhosted.org/packages/00/56/85b7f0f74604968ca50001416898afb52b03e8da2b697cffc4dc7374e507/poyo-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4c703e4e10501c5742a0a4a1319ae314", "sha256": "514b58bd42baba06a9d8b67f4ce182405354e6c792b8bc08c040e481231ad27b" }, "downloads": -1, "filename": "poyo-0.2.0.tar.gz", "has_sig": false, "md5_digest": "4c703e4e10501c5742a0a4a1319ae314", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7122, "upload_time": "2016-04-13T19:46:24", "url": "https://files.pythonhosted.org/packages/f1/e6/c9a36b6b67855a760615ebdcc8ce7ec49825c099059a6162678bb653bcb5/poyo-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "543e2c73004145dc7dff0a2a18c2e9c3", "sha256": "a6e1485deaef080d0769d108b6c78b3c2305ee84cc4b52d39ee3c8d16a40041e" }, "downloads": -1, "filename": "poyo-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "543e2c73004145dc7dff0a2a18c2e9c3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9183, "upload_time": "2016-05-20T09:43:12", "url": "https://files.pythonhosted.org/packages/28/ff/f3276c42d61992cc6594f1e2201c7f57bc12f518a30f5c2f992fc9668fbd/poyo-0.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "16fd6196e22128262327b402c9312dac", "sha256": "a73c014ec074face7f9f320f1cfdc205765ddb19d6076365b1e6a6eca1653d68" }, "downloads": -1, "filename": "poyo-0.3.0.tar.gz", "has_sig": false, "md5_digest": "16fd6196e22128262327b402c9312dac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8177, "upload_time": "2016-05-20T09:43:30", "url": "https://files.pythonhosted.org/packages/b9/d1/f8f50ce8f3cce942c1136ad5c8db4d2462751fd4616dc16535a6c4b7730f/poyo-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "01924d9a1ca973c7bc64b228883ec412", "sha256": "587cb31da16cb6d3015f2cc0b07322b6468c70f87c67b2d4aa501b3e77f0942d" }, "downloads": -1, "filename": "poyo-0.4.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "01924d9a1ca973c7bc64b228883ec412", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12390, "upload_time": "2016-05-26T19:04:12", "url": "https://files.pythonhosted.org/packages/cf/f0/be1aba261b693d89231694f8cc8dcbda22bd42e2a2377221562dce8b945f/poyo-0.4.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5276a97514e262852998c81c6645fc17", "sha256": "8a95d95193eb0838117cc8847257bf17248ef6d157aaa55ea5c20509a87388b8" }, "downloads": -1, "filename": "poyo-0.4.0.tar.gz", "has_sig": false, "md5_digest": "5276a97514e262852998c81c6645fc17", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10722, "upload_time": "2016-05-26T19:04:17", "url": "https://files.pythonhosted.org/packages/7a/93/3f5e0a792de7470ffe730bdb6a3dc311b8f9734aa65598ad3825bbf48edf/poyo-0.4.0.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "a242d2c70ae5ad88918d2e647e9592e8", "sha256": "230ec11c2f35a23410c1f0e474f09fa4e203686f40ab3adca7b039c845d8c325" }, "downloads": -1, "filename": "poyo-0.4.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a242d2c70ae5ad88918d2e647e9592e8", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12406, "upload_time": "2017-03-21T14:46:28", "url": "https://files.pythonhosted.org/packages/ea/6c/62c76c12015f6a1849446fb73da59be1229312c54d6d05068275e52bf29f/poyo-0.4.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "47cd398821074751cf7d2259c0ac75e9", "sha256": "103b4ee3e1c7765098fe1cabe43f828db2e2a6079646561a2117e1a809f352d6" }, "downloads": -1, "filename": "poyo-0.4.1.tar.gz", "has_sig": false, "md5_digest": "47cd398821074751cf7d2259c0ac75e9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10960, "upload_time": "2017-03-21T14:46:30", "url": "https://files.pythonhosted.org/packages/9f/7a/d92b5cc1d2f6bf0f1c1cd427e1665a3b3889563ba25fbb66f50356954c45/poyo-0.4.1.tar.gz" } ], "0.4.2": [ { "comment_text": "", "digests": { "md5": "12585d428e202ef4943b3ff16ba64593", "sha256": "d1c317054145a6b1ca0608b5e676b943ddc3bfd671f886a2fe09288b98221edb" }, "downloads": -1, "filename": "poyo-0.4.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "12585d428e202ef4943b3ff16ba64593", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8792, "upload_time": "2018-09-28T10:35:57", "url": "https://files.pythonhosted.org/packages/e0/16/e00e3001007a5e416ca6a51def6f9e4be6a774bf1c8486d20466f834d113/poyo-0.4.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5db7a089967d4f6e1f6c226a8875e8ae", "sha256": "c34a5413191210ed564640510e9c4a4ba3b698746d6b454d46eb5bfb30edcd1d" }, "downloads": -1, "filename": "poyo-0.4.2.tar.gz", "has_sig": false, "md5_digest": "5db7a089967d4f6e1f6c226a8875e8ae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15572, "upload_time": "2018-09-28T10:35:59", "url": "https://files.pythonhosted.org/packages/e2/74/3cca4e9a3d11f4f55eb7ed44d1cb09d403b7491cb03daa037f8338a09ed1/poyo-0.4.2.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "20c1a169db35ca9ca81265038b801385", "sha256": "3e2ca8e33fdc3c411cd101ca395668395dd5dc7ac775b8e809e3def9f9fe041a" }, "downloads": -1, "filename": "poyo-0.5.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "20c1a169db35ca9ca81265038b801385", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 10183, "upload_time": "2019-07-26T12:51:02", "url": "https://files.pythonhosted.org/packages/42/50/0b0820601bde2eda403f47b9a4a1f270098ed0dd4c00c443d883164bdccc/poyo-0.5.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "87105d14ce1ea656f816bd0af001cfe1", "sha256": "e26956aa780c45f011ca9886f044590e2d8fd8b61db7b1c1cf4e0869f48ed4dd" }, "downloads": -1, "filename": "poyo-0.5.0.tar.gz", "has_sig": false, "md5_digest": "87105d14ce1ea656f816bd0af001cfe1", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 15276, "upload_time": "2019-07-26T12:51:04", "url": "https://files.pythonhosted.org/packages/7d/56/01b496f36bbd496aed9351dd1b06cf57fd2f5028480a87adbcf7a4ff1f65/poyo-0.5.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "20c1a169db35ca9ca81265038b801385", "sha256": "3e2ca8e33fdc3c411cd101ca395668395dd5dc7ac775b8e809e3def9f9fe041a" }, "downloads": -1, "filename": "poyo-0.5.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "20c1a169db35ca9ca81265038b801385", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 10183, "upload_time": "2019-07-26T12:51:02", "url": "https://files.pythonhosted.org/packages/42/50/0b0820601bde2eda403f47b9a4a1f270098ed0dd4c00c443d883164bdccc/poyo-0.5.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "87105d14ce1ea656f816bd0af001cfe1", "sha256": "e26956aa780c45f011ca9886f044590e2d8fd8b61db7b1c1cf4e0869f48ed4dd" }, "downloads": -1, "filename": "poyo-0.5.0.tar.gz", "has_sig": false, "md5_digest": "87105d14ce1ea656f816bd0af001cfe1", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 15276, "upload_time": "2019-07-26T12:51:04", "url": "https://files.pythonhosted.org/packages/7d/56/01b496f36bbd496aed9351dd1b06cf57fd2f5028480a87adbcf7a4ff1f65/poyo-0.5.0.tar.gz" } ] }