{ "info": { "author": "Jakub Valenta", "author_email": "jakub@jakubvalenta.cz", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development" ], "description": "# ListIO\n\nRead/write lists and maps (two dimensional lists) from/to files.\n\n- Lists are stored as plain text files with one list item per line.\n- Maps (two dimensional lists) are stored as CSV.\n\nWhen reading a list or map, lines starting with a hash sign (`#`) are considered\nto be comments and therefore ignored.\n\n## Installation\n\nInstall ListIO using pip:\n\n```\npip install listio\n```\n\n## Usage\n\n### Lists\n\n#### Writing\n\n```python\nimport listio\n\nlistio.write_list(\n 'mylist.txt',\n ['foo', 'bar', 'baz']\n)\n```\n\nmylist.txt now contains:\n\n```\nfoo\nbar\nbaz\n```\n\n#### Reading\n\nmylist.txt:\n\n```\nFirst item\nsecond item\nfoo\n# this is a comment\nbar\n```\n\nRead `mylist.txt` as an iterator:\n\n```python\n>>> import listio\n>>> mylist = listio.read_list('mylist.txt')\n>>> list(mylist)\n['First item', 'second item', 'foo', 'bar']\n```\n\n### Maps\n\n#### Writing\n\n```python\nimport listio\n\nlistio.write_map(\n 'mymap.csv,\n [['foo bar', 'baz', 'x'], [1, 2, 3]]\n)\n```\n\nmymap.csv now contains:\n\n```\nfoo bar;baz;x\n1;2;3\n```\n\nThe default CSV delimiter is `;` and lineterminator `\\n`. You can change this:\n\n``` python\nlistio.write_map(\n 'mymap.csv,\n [['foo bar', 'baz', 'x'], [1, 2, 3]],\n delimiter=',',\n lineterminator='\\r\\n'\n)\n```\n\n### Reading\n\nmymap.csv:\n\n```csv\nFirst column;\"second column\";3\n# this is a comment\n\"next;item,\";foo;bar\n```\n\nRead `mymap.csv` as an iterator:\n\n```python\n>>> import listio\n>>> mymap = listio.read_map('mymap.csv')\n>>> list(mymap)\n[['First column', 'second column', '3'], ['next;item,', 'foo', 'bar']]\n```\n\nThe default CSV delimiter is `;` and lineterminator `\\n`. You can change this:\n\n``` python\n>>> listio.read_map('mymap.csv', delimiter=',', lineterminator='\\r\\n')\n```\n\n## Examples\n\nSee [tests/test_listio.py](tests/test_listio.py) for more usage examples.\n\n## Contributing\n\nSee [NOTICE](./NOTICE) and [LICENSE](./LICENSE) for license information.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jakubvalenta/listio", "keywords": "", "license": "Apache Software License", "maintainer": "", "maintainer_email": "", "name": "listio", "package_url": "https://pypi.org/project/listio/", "platform": "", "project_url": "https://pypi.org/project/listio/", "project_urls": { "Homepage": "https://github.com/jakubvalenta/listio" }, "release_url": "https://pypi.org/project/listio/1.1.0/", "requires_dist": null, "requires_python": "", "summary": "Read/write lists and maps (two dimensional lists) from/to files.", "version": "1.1.0" }, "last_serial": 4109914, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "8c5e8f7d660ff86674e2f1c2636ee2df", "sha256": "6407371b907ff614ec965d2ccc4027e23e26756a85e4e3f3016888ee1df4b815" }, "downloads": -1, "filename": "listio-1.0.0-py2.7.egg", "has_sig": false, "md5_digest": "8c5e8f7d660ff86674e2f1c2636ee2df", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 3118, "upload_time": "2016-04-21T17:21:47", "url": "https://files.pythonhosted.org/packages/e8/42/f21f173d8768bfa8d00cc54bd70c6b776eb52e6a128b8eec0ec75b24a346/listio-1.0.0-py2.7.egg" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "9be2c778e846ee18808e03e8bf58155a", "sha256": "eb6094c97e80c8b0986ced7c9307f9fb96281cc15833d5c14dbcd03c5cadf1cc" }, "downloads": -1, "filename": "listio-1.0.1.tar.gz", "has_sig": false, "md5_digest": "9be2c778e846ee18808e03e8bf58155a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2492, "upload_time": "2018-07-26T20:39:21", "url": "https://files.pythonhosted.org/packages/b1/2a/cf8fc82e961fcbb11e4e1df5050defd8354595f9e9cbafbd3094a20e1d8e/listio-1.0.1.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "24d495530df9d811ebea03e3cf68ca68", "sha256": "65a7fffab97ee8f49c00e0e11e83b2a962aaf249896758a908cfcbb9ec423d4b" }, "downloads": -1, "filename": "listio-1.1.0.tar.gz", "has_sig": false, "md5_digest": "24d495530df9d811ebea03e3cf68ca68", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2607, "upload_time": "2018-07-27T18:59:59", "url": "https://files.pythonhosted.org/packages/5c/03/d2054768a8290ccf36f364eb49c3cea77b6b127140575615250e7843ab89/listio-1.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "24d495530df9d811ebea03e3cf68ca68", "sha256": "65a7fffab97ee8f49c00e0e11e83b2a962aaf249896758a908cfcbb9ec423d4b" }, "downloads": -1, "filename": "listio-1.1.0.tar.gz", "has_sig": false, "md5_digest": "24d495530df9d811ebea03e3cf68ca68", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2607, "upload_time": "2018-07-27T18:59:59", "url": "https://files.pythonhosted.org/packages/5c/03/d2054768a8290ccf36f364eb49c3cea77b6b127140575615250e7843ab89/listio-1.1.0.tar.gz" } ] }