{ "info": { "author": "Xian Zheng", "author_email": "714186139@qq.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy" ], "description": "# Brief\n\nread/write .properties file in line-oriented format \n`key=value` per line *through function*.\n\n*the code refers to `java.util.Properties` in Java 1.6.*\n\n\n# Common Usage\n\n* file I/O:\n ```python\n # input\n properties = load(file)\n # or update existing dictionary\n load(file, properties)\n \n # output\n store(file, properties)\n ```\n\n* custom input: \n `class LineReader` read in one key-value data. It skips all comment lines, \n blank lines, leading whitespace, and processes multi-line data. \n `loadSingle(string)` read each piece of data given above to key-value. \n ```python\n for line in LineReader(file): # each key-value line has no line seperator\n key, value = loadSingle(line)\n # do something\n ```\n\n* custom output: \n `storeComments(writable, comments, linesep=os.linesep))` \n write comment (accept multi-line), can specify the line terminator. \n `storeSingle(writable, key, value, sep='=', linesep=os.linesep)` \n write one key-value, can specify the seperator and the line terminator. \n ```python\n storeComments(file, 'this is a comment')\n storeSingle(file, 'key', 'value')\n ```\n\n\n# File Format\n\nnormally each line is comment line or a key-value pair.\n\nmain features:\n* seperate key and value by one of `=`, `:`, ` `, `\\t`\n* ignore whitespaces leading in a line or around `=` or `:`\n* comment line begin with `#` or `!`\n* escape unicode by `\\uxxxx`\n* escape special characters by adding `\\`\n\nothers:\n* data line ends with `\\` discard the line break\n\ndifferences with Java:\n* store method will not write datetime comment\n\n\n# Changelog\n\n## v0.1.1, 2019-2-9\n* change to run with python3\n\n## v0.1.0, 2018-6-7\n* set up.", "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/SineObama/", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "sine.properties", "package_url": "https://pypi.org/project/sine.properties/", "platform": "", "project_url": "https://pypi.org/project/sine.properties/", "project_urls": { "Homepage": "https://github.com/SineObama/" }, "release_url": "https://pypi.org/project/sine.properties/0.1.1/", "requires_dist": null, "requires_python": ">=3.6.0", "summary": "read/write .properties file in a simple line-oriented format", "version": "0.1.1" }, "last_serial": 4798418, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "28b899af2b9b42aa20baf188fb649e8e", "sha256": "1484aaff90249dfdbfc8ea4810f0d2a311a56e26003d0993697bc3ba0bb54819" }, "downloads": -1, "filename": "sine.properties-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "28b899af2b9b42aa20baf188fb649e8e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7.0", "size": 12570, "upload_time": "2018-06-07T08:48:33", "url": "https://files.pythonhosted.org/packages/01/81/485da15d05879fd3dac7093e49be76c966d6d24754cf14377969a9fea869/sine.properties-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0c9bcc882c6cebfa209f914ab6619106", "sha256": "663b986c1c54164fdc6c8602ba4da884136537b1c007e1d2fdd9921ebbfea56d" }, "downloads": -1, "filename": "sine.properties-0.1.0.tar.gz", "has_sig": false, "md5_digest": "0c9bcc882c6cebfa209f914ab6619106", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7.0", "size": 11919, "upload_time": "2018-06-07T08:48:34", "url": "https://files.pythonhosted.org/packages/fb/b7/37a6e56e7176319d64c6fe56395f611cad30557da794a930115a25d6c663/sine.properties-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "54b97c041810dfaf1439ddebacdea02e", "sha256": "4f35c8a9f1cbdd24bf98c36ddb5ad447112a540ea3b50ec96d1112a293da21db" }, "downloads": -1, "filename": "sine.properties-0.1.1.tar.gz", "has_sig": false, "md5_digest": "54b97c041810dfaf1439ddebacdea02e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 13143, "upload_time": "2019-02-09T04:40:00", "url": "https://files.pythonhosted.org/packages/8d/52/d64f96b46aeb1d650849f270ad4c5cde446afcf381ef2b3a5023e609cb05/sine.properties-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "54b97c041810dfaf1439ddebacdea02e", "sha256": "4f35c8a9f1cbdd24bf98c36ddb5ad447112a540ea3b50ec96d1112a293da21db" }, "downloads": -1, "filename": "sine.properties-0.1.1.tar.gz", "has_sig": false, "md5_digest": "54b97c041810dfaf1439ddebacdea02e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 13143, "upload_time": "2019-02-09T04:40:00", "url": "https://files.pythonhosted.org/packages/8d/52/d64f96b46aeb1d650849f270ad4c5cde446afcf381ef2b3a5023e609cb05/sine.properties-0.1.1.tar.gz" } ] }