{ "info": { "author": "Anselm Kiefner", "author_email": "stay-pypi@anselm.kiefner.de", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Text Processing :: Markup" ], "description": "# STAY - Simple, even Trivial Alternative to Yaml\n\nYAML may be readable by humans, but there are shortcomings. There is strict YAML, TOML etc. but they all suffer from the same false premise. If you have stuff hand-written by humans, you must validate one way or another. With pydantic a simple, yet powerful framework exists to validate and convert values into the desired format when the content is read. This means there simply is no point in type-hinting within the document, which adds ambiguity, unnecessary complexity and visual clutter, not to mention the annoying manual escaping of special characters that does nothing for usability.\n\nSTAY removes all that overhead and reduces syntax to the bare minimum, which can easily be parsed into pydantic to get what you want.\n\n## Syntax\nSTAY is line-based. The file is read line by line, translated into a generator/list of dictionaries. \n\n### Documents\nDictionaries (aka documents) are seperated by lines that start with **===** or **---**. For instance, in a configuration this allows defaults on top of the file, user-defined values below, which overwrite the default.\n\n### Simple values\nFrom there simple key/value pairs are written like **key: value** on a single line. Leading and trailing whitespace is stripped. Anything that can be directly converted like int, str, float etc. doesn't require extra characters.\n\n### Simple list\nA simple list of values is written as **key: \\[1 2 3 asdf \"foo bar\"\\]**.\n\n### Comments\nComments are also line-based. Any line that starts with # is ignored. Additionally, a block can be commented out by putting ### above and below of the block.\n\n### Long values\nAnything that involves linebreak (\\n) characters would need to be manually escaped, but there is a simple solution to that: long values. A key: with **:::** instead of : will start a block of long value, where everything is escaped until a single line starting with triple colons (if inside the block, it can be manually escaped by \\\\:::, which is the only exception, everything else is parsed as-is).\n \n key:::\n long\n value\n :::\n \n### Long lists\nSimilarly, you can make a list of strings where each line is an item (spaces, newlines and tabs at beginning and end are removed!):\n\n\tkey:::[\n\ta\n\tb\n\tc\n\t]:::\nHowever, unlike long values, long lists also work with the list syntax, so you can easily write a matrix like this:\n\n\tmatrix:::[\n\t[1 2 3]\n\t[4 5 6]\n\t[7 8 9]\n\t]:::\n\n### Hierachy\nAs with JSON or YAML, a single document/dictionary may be nested. Levels are indicated by indentation of tabs or spaces (4 is default).\n \n a:\n b:\n c:3\n foo: 4\n bar: 6\n \nLong values can be used at any point, which ignore the indentation level until end of the block.\n\n### Directives\nIn future, directives - lines starting with ***%*** outside of blocks - can be used to easily extend STAY without interfering with the rest of the syntax, for instance for third party modules, but right now there is no functionality associated.\n\n### Known Limitations\nSTAY tries to be simple and *stay* simple, so there are limitations to the syntax that are not easily fixed without blowing the specs out of proportion.\nFor instance at this moment it isn't possible to easily implement dictionaries within lists (you could work around that with key-value pairs, but that might be cumbersome),\nalso a deeper nesting than lists-in-lists (long list/matrix syntax) is not supported at this moment.\nFeel free to submit ideas on how to lift these limitations by means of syntax (if it doesn't add complexity!) or via directives.\n\n## Use\nYou can load(file) or loads(line-iterator) to read stuff and dumps(dict-iterator) to convert stuff.\nExamples can be found in the Showcase Jupyter Notebook (in /docs) or look at the tests.\nPlease keep in mind that STAY outputs a list of dictionaries with no check whatsoever for duplicate keys. \nIf this is a problem for you, please consider writing a directive and submit a pull request.\n\n***That's it - enjoy!***", "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/amogorkon/stay", "keywords": "json,yaml,toml,config,simple,alternative", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "stay", "package_url": "https://pypi.org/project/stay/", "platform": "", "project_url": "https://pypi.org/project/stay/", "project_urls": { "Homepage": "https://github.com/amogorkon/stay" }, "release_url": "https://pypi.org/project/stay/0.2.2/", "requires_dist": null, "requires_python": ">3.5", "summary": "Simple, even Trivial Alternative to Yaml", "version": "0.2.2" }, "last_serial": 5822952, "releases": { "0.1.10.post5": [ { "comment_text": "", "digests": { "md5": "221abd6574800aaf51dc4afffad5c2ec", "sha256": "4f39cfa4bc58dd1d25ac25a2d49515b513c99b78e0d50d5f6d94d8d2b54ae75c" }, "downloads": -1, "filename": "stay-0.1.10.post5.tar.gz", "has_sig": false, "md5_digest": "221abd6574800aaf51dc4afffad5c2ec", "packagetype": "sdist", "python_version": "source", "requires_python": ">3.5", "size": 6033, "upload_time": "2018-12-06T15:38:37", "url": "https://files.pythonhosted.org/packages/39/96/2a3e5bbfa682bd5128e909fb162b279d769ee0ad04cf28071704fb7c9b00/stay-0.1.10.post5.tar.gz" } ], "0.1.10.post6": [ { "comment_text": "", "digests": { "md5": "6223c459bc5c1716f9afd989533ad4fd", "sha256": "19d523b82a37819d6a9d1a672c26da306e09382c9ae608242cb17855265c58f2" }, "downloads": -1, "filename": "stay-0.1.10.post6-py3-none-any.whl", "has_sig": false, "md5_digest": "6223c459bc5c1716f9afd989533ad4fd", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">3.5", "size": 6242, "upload_time": "2018-12-06T15:38:34", "url": "https://files.pythonhosted.org/packages/3d/92/4d237cc61e100c264792b115eb2e954d9b0c82f67af77ffeb5dd80319108/stay-0.1.10.post6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "47601e7fdc6f29174adf50e4ce3e0fa4", "sha256": "707551203a60b82d83aeb64eea6caf3b9c223527d1172fdbeb6e281d3a15f821" }, "downloads": -1, "filename": "stay-0.1.10.post6.tar.gz", "has_sig": false, "md5_digest": "47601e7fdc6f29174adf50e4ce3e0fa4", "packagetype": "sdist", "python_version": "source", "requires_python": ">3.5", "size": 6041, "upload_time": "2018-12-06T15:38:38", "url": "https://files.pythonhosted.org/packages/48/70/d1c2240c0235bb588e64d5e1f32054facc870a588c3cff5139864df115bb/stay-0.1.10.post6.tar.gz" } ], "0.1.10.post7": [ { "comment_text": "", "digests": { "md5": "381d4d95e7044d08a92d5c4055e6b5c8", "sha256": "f4fa4dc268d2ab35ce529f8febcc0408d2172649d07883210ccc126fbe0a883f" }, "downloads": -1, "filename": "stay-0.1.10.post7-py3-none-any.whl", "has_sig": false, "md5_digest": "381d4d95e7044d08a92d5c4055e6b5c8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">3.5", "size": 6350, "upload_time": "2019-07-11T19:30:39", "url": "https://files.pythonhosted.org/packages/54/1d/0b420145d4b8b118a99f060326fee2e164ddea160d7c931a05ad896fab10/stay-0.1.10.post7-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d9a76f449c3c71cf083f4de33a8c257a", "sha256": "6bc620ec8897272a1cc81b6b8abab2f972f4e00c7e3abee18e82b3e42e5cd723" }, "downloads": -1, "filename": "stay-0.1.10.post7.tar.gz", "has_sig": false, "md5_digest": "d9a76f449c3c71cf083f4de33a8c257a", "packagetype": "sdist", "python_version": "source", "requires_python": ">3.5", "size": 6169, "upload_time": "2019-07-11T19:30:43", "url": "https://files.pythonhosted.org/packages/3c/9f/b9b01dcaa62cc866d7bcf8adeafd44c175c25f795fa044dd79b75da15ba1/stay-0.1.10.post7.tar.gz" } ], "0.1.10.post8": [ { "comment_text": "", "digests": { "md5": "4a9edda010561d5cd42893a4d075001e", "sha256": "589387486db01d6395e24ecbb6e0fe30e7a1044af41403be8da1268e893d3826" }, "downloads": -1, "filename": "stay-0.1.10.post8.tar.gz", "has_sig": false, "md5_digest": "4a9edda010561d5cd42893a4d075001e", "packagetype": "sdist", "python_version": "source", "requires_python": ">3.5", "size": 6147, "upload_time": "2019-07-24T09:13:47", "url": "https://files.pythonhosted.org/packages/bb/a5/f57027fc24b5692b2ffde6d5cc6c2dccaa96c95f7e2c55b3c0e3f9e74c73/stay-0.1.10.post8.tar.gz" } ], "0.1.10.post9": [ { "comment_text": "", "digests": { "md5": "36d97a507128906ebcc84770338817c8", "sha256": "1fe363c53d7605f4a01ac7aa40dd07babd4ac55b565e91e7f609508a3114e94d" }, "downloads": -1, "filename": "stay-0.1.10.post9.tar.gz", "has_sig": false, "md5_digest": "36d97a507128906ebcc84770338817c8", "packagetype": "sdist", "python_version": "source", "requires_python": ">3.5", "size": 6156, "upload_time": "2019-07-24T09:26:29", "url": "https://files.pythonhosted.org/packages/78/e4/2ba6ee8850a96c31d32bbfefc6417edd3a4e1280824d0723d1263b4a134b/stay-0.1.10.post9.tar.gz" } ], "0.2.1.post1": [ { "comment_text": "", "digests": { "md5": "b798cf53706240c87185ba1ea7ee7346", "sha256": "1c23d76561a9ae9a49e0786a7d308662d6b3dabd7259bebc3ac5912ec0b81e4f" }, "downloads": -1, "filename": "stay-0.2.1.post1.tar.gz", "has_sig": false, "md5_digest": "b798cf53706240c87185ba1ea7ee7346", "packagetype": "sdist", "python_version": "source", "requires_python": ">3.5", "size": 6281, "upload_time": "2019-09-06T14:38:04", "url": "https://files.pythonhosted.org/packages/a4/e9/f844726f848ded67ab19ddf1ed892f313f9a7ae36df8584f7035fde30c8b/stay-0.2.1.post1.tar.gz" } ], "0.2.1.post2": [ { "comment_text": "", "digests": { "md5": "00750391e00714cb80b9719fce256936", "sha256": "02d709708848cf00fe6ae0cc0eb9a95f8013ca1d8b2fa762336686372b83228a" }, "downloads": -1, "filename": "stay-0.2.1.post2.tar.gz", "has_sig": false, "md5_digest": "00750391e00714cb80b9719fce256936", "packagetype": "sdist", "python_version": "source", "requires_python": ">3.5", "size": 6282, "upload_time": "2019-09-06T14:53:42", "url": "https://files.pythonhosted.org/packages/6b/57/e22580de7216bd3ae5cd8e15219dde8306e0e20d6d64bb26bdda3f9996a9/stay-0.2.1.post2.tar.gz" } ], "0.2.1.post3": [ { "comment_text": "", "digests": { "md5": "e6c88fa51183fffa974bb7a60eb45cca", "sha256": "302c1f7788d8b18172c2039b53684540aa648f9d7b4d829ae5e4d2cca6534f3a" }, "downloads": -1, "filename": "stay-0.2.1.post3.tar.gz", "has_sig": false, "md5_digest": "e6c88fa51183fffa974bb7a60eb45cca", "packagetype": "sdist", "python_version": "source", "requires_python": ">3.5", "size": 6250, "upload_time": "2019-09-06T14:57:26", "url": "https://files.pythonhosted.org/packages/4a/41/6aa432031a04814e412fd20e9817d32fd53a683e177317a642215b217464/stay-0.2.1.post3.tar.gz" } ], "0.2.1.post4": [ { "comment_text": "", "digests": { "md5": "1c0f1ac05da0e43e553bec7b5d6e8b79", "sha256": "f0aa1ba5f32558462d2e5f02439b749c15e8dbc10978ee597825c28dd836f088" }, "downloads": -1, "filename": "stay-0.2.1.post4.tar.gz", "has_sig": false, "md5_digest": "1c0f1ac05da0e43e553bec7b5d6e8b79", "packagetype": "sdist", "python_version": "source", "requires_python": ">3.5", "size": 6196, "upload_time": "2019-09-12T21:23:37", "url": "https://files.pythonhosted.org/packages/ac/8a/8c2481b66b1325291e0e74470d0ea636344fddd196283e5e92e999425cbf/stay-0.2.1.post4.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "e91dde697d7026f6bc1d192834d1216a", "sha256": "14cef6eebddb367d3de0ab106665f07a753262ca5bc3a6022edb17b1ca9c3f73" }, "downloads": -1, "filename": "stay-0.2.2.tar.gz", "has_sig": false, "md5_digest": "e91dde697d7026f6bc1d192834d1216a", "packagetype": "sdist", "python_version": "source", "requires_python": ">3.5", "size": 6037, "upload_time": "2019-09-12T22:45:48", "url": "https://files.pythonhosted.org/packages/ef/7f/86c7ca0a221af4bbf90a4bcc87f7ee8ffd55a2038b8a5d8fb619778114b3/stay-0.2.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e91dde697d7026f6bc1d192834d1216a", "sha256": "14cef6eebddb367d3de0ab106665f07a753262ca5bc3a6022edb17b1ca9c3f73" }, "downloads": -1, "filename": "stay-0.2.2.tar.gz", "has_sig": false, "md5_digest": "e91dde697d7026f6bc1d192834d1216a", "packagetype": "sdist", "python_version": "source", "requires_python": ">3.5", "size": 6037, "upload_time": "2019-09-12T22:45:48", "url": "https://files.pythonhosted.org/packages/ef/7f/86c7ca0a221af4bbf90a4bcc87f7ee8ffd55a2038b8a5d8fb619778114b3/stay-0.2.2.tar.gz" } ] }