{ "info": { "author": "Brandon Istenes", "author_email": "brandonesbox@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "# EZCSV\n\nSome utility functions to do the obvious things you want to do with CSV files.\n\n`csv` is easy, this is EZ.\n\nInstall it: `pip install ezcsv`\n\nDefinitely works with Python 3+.\n\nIt's on it's way towards compatability with Python 2.6+. \n\nIt's hard to say anything about it difinitively because there are no tests.\n\nPlease see \"Contributing\" below.\n\n\n## Reference\n\n#### `read_dicts(file_path)`\n\nReturns the data at `file_path` as a list of dicts.\n\n- **`file_path`** `string | Path`\n\n#### `read_lists(file_path)`\n\nReturns the data at `file_path` as a list of lists. Ignores blank lines.\n\n- **`file_path`** `string | Path`\n\nExample Usage:\n```\n>>> from easycsv import csv_as_list\n>>> filepath = 'C:\\\\path\\\\to\\\\file.csv'\n>>> print(filepath)\nC:\\path\\to\\file.csv\n>>> l = csv_as_list(filepath)\n>>> print(l[0])\nFirst,Line,Of,File,Prints,Here\n```\n\n#### `write_dicts(data, csv_path, mkdir=False, silent_fail=False, fieldnames=None, encoding='utf-8', **kwargs)`\n\nWrites the input data to a CSV file\n\nAlways produces a Unix-style CSV file, regardless of whether on\nWindows or not.\n\n- **`data`** `list[dict]`\n\n One dict per line. The first dict is expected to contain all of the\nkeys that will form the header line, unless `fieldnames` is provided.\n- **`csv_path`** `string | Path`\n\n Should have a .csv extension. `mkdir` will malfunction if it doesn't.\n- **`mkdir`** `bool`\n\n If true, creates the directory tree leading up to `csv_path`, ignoring\nif directories already exist. Default: `False`\n- **`silent_fail`**: `bool`\n\n If `true`, causes the method to do nothing if `data` happens\nto be empty. Default: `False`\n- **`fieldnames`**: `list[str]`\n\n If set, provides the list of field names to be passed to `csv.DictWriter`.\nThese are written as the header, regardless of what keys are present in\nthe first dict in `data`. Default: `None`\n- **`encoding`**: `str`\n\n The encoding to write with. Default: 'utf-8' \n\n- **`kwargs`**: `dict`\n\n Passed on to `csv.DictWriter`. Cannot include `fieldnames`.\n\n#### `write_lists(data, csv_path, mkdir=False)`\n\nWrites the input data to a CSV file\n\nAlways produces a Unix-style CSV file, regardless of whether on\nWindows or not.\n\n- **`data`** `list[list]`\n\n - **`csv_path`** `string | Path`\n\nShould have a .csv extension. `mkdir` will malfunction if it doesn't.\n- **`mkdir`** `bool`\n\n If true, creates the directory tree leading up to `csv_path`, ignoring\nif directories already exist.\n\n\n## Contributing\n\nThis could really use some tests!\n\nFeel free to fork and open a pull request. Please, one pull request per\nfunctional change.\n\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/brandones/ezcsv", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "ezcsv", "package_url": "https://pypi.org/project/ezcsv/", "platform": "", "project_url": "https://pypi.org/project/ezcsv/", "project_urls": { "Homepage": "https://github.com/brandones/ezcsv", "Source": "https://github.com/brandones/ezcsv" }, "release_url": "https://pypi.org/project/ezcsv/0.3/", "requires_dist": null, "requires_python": "", "summary": "Functions to do obvious things with CSVs", "version": "0.3" }, "last_serial": 4491349, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "218bcd492c320c95305f97470389f07a", "sha256": "ea701919af5aab456a39c0b34bd2af0191addfaeac845398e0d1cd691e48a4c4" }, "downloads": -1, "filename": "ezcsv-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "218bcd492c320c95305f97470389f07a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4370, "upload_time": "2018-10-17T02:58:45", "url": "https://files.pythonhosted.org/packages/76/43/c03a5cbf6fd57ab652c1f811bc607f4843f95277035bfc2e39832a060090/ezcsv-0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fc56be1cc9951c26d659aba5caa60284", "sha256": "de8f2be979c8aab01509efd1798fa939f02befbde96f7a4f74f1d6e872e384c2" }, "downloads": -1, "filename": "ezcsv-0.1.tar.gz", "has_sig": false, "md5_digest": "fc56be1cc9951c26d659aba5caa60284", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2535, "upload_time": "2018-10-17T02:58:47", "url": "https://files.pythonhosted.org/packages/b3/6a/422fc546b2dadb2302054674e71937559ad29f9391c2bf956342f97fdad3/ezcsv-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "bd0ea4d0afa6ccf70388d91148624158", "sha256": "ac3c7a74319c6eab624c60a9970a696d563605d5da2478263115faa2e00e4ccc" }, "downloads": -1, "filename": "ezcsv-0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "bd0ea4d0afa6ccf70388d91148624158", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4986, "upload_time": "2018-11-15T20:35:36", "url": "https://files.pythonhosted.org/packages/0e/1d/e052475803744c0bede1ad87c1f9aacf01099edd8d7858d4e5663f1e07e2/ezcsv-0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0ee31cfd9867ad323678c1c35c7d4aa2", "sha256": "7f32734e3e99d62ae4dc7b7510d4d30aecaa14cc41fbef878f1c22ab2f58707c" }, "downloads": -1, "filename": "ezcsv-0.2.tar.gz", "has_sig": false, "md5_digest": "0ee31cfd9867ad323678c1c35c7d4aa2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2919, "upload_time": "2018-11-15T20:35:37", "url": "https://files.pythonhosted.org/packages/27/86/89dc11a724fbae226b6ed5541e6d2e8d86d8647efd537eb28c916debbb38/ezcsv-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "5049ada24b0d266d165003f86ff08ee8", "sha256": "03943f6ebd78d52ff8ce8cec9d9cd58049a70ff6ace9a2337d88176bb351bb75" }, "downloads": -1, "filename": "ezcsv-0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "5049ada24b0d266d165003f86ff08ee8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5421, "upload_time": "2018-11-15T21:33:33", "url": "https://files.pythonhosted.org/packages/e7/33/c7901276cca869609b595a08c4f84cc627bfe6bede4bce5e8f85df0abded/ezcsv-0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7039417149afd4d61c44be2283711070", "sha256": "28210d0bb9fe7308b9592ae4cf1712a05138d27dc43aa082e36e3bad6ef81574" }, "downloads": -1, "filename": "ezcsv-0.3.tar.gz", "has_sig": false, "md5_digest": "7039417149afd4d61c44be2283711070", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3122, "upload_time": "2018-11-15T21:33:34", "url": "https://files.pythonhosted.org/packages/0e/d6/f79124af4e9cf2a67fcfae09f640e2307a954d72de9eacc4eba1ea2d2610/ezcsv-0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5049ada24b0d266d165003f86ff08ee8", "sha256": "03943f6ebd78d52ff8ce8cec9d9cd58049a70ff6ace9a2337d88176bb351bb75" }, "downloads": -1, "filename": "ezcsv-0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "5049ada24b0d266d165003f86ff08ee8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5421, "upload_time": "2018-11-15T21:33:33", "url": "https://files.pythonhosted.org/packages/e7/33/c7901276cca869609b595a08c4f84cc627bfe6bede4bce5e8f85df0abded/ezcsv-0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7039417149afd4d61c44be2283711070", "sha256": "28210d0bb9fe7308b9592ae4cf1712a05138d27dc43aa082e36e3bad6ef81574" }, "downloads": -1, "filename": "ezcsv-0.3.tar.gz", "has_sig": false, "md5_digest": "7039417149afd4d61c44be2283711070", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3122, "upload_time": "2018-11-15T21:33:34", "url": "https://files.pythonhosted.org/packages/0e/d6/f79124af4e9cf2a67fcfae09f640e2307a954d72de9eacc4eba1ea2d2610/ezcsv-0.3.tar.gz" } ] }