# csvplus
> Create, Read, Update, Delete, and Move Rows in a CSV File
## install
```sh
pip install csvplus
```
## usage
```py
import csvplus
filepath = "./folder/cars.csv"
# create csv with the given column names
csvplus.create(filepath, ["make","model","year"])
# append a new row to the end of the csv file
csvplus.add(filepath, { "make": "Kia", "model": "Soul", "year": 2023 })
# delete all rows matching the where conditions
csvplus.delete(filepath, where={ "make": "Tesla" })
# find all rows matching the where conditions
csvplus.read("countries.csv", where={ "year": 1776 })
[{ "name": "United States of Ameriac", "abbreviation": "USA", "year": 1776 }]
# move rows
move(filepath, from_row, to_row, debug_level=0, quoting=csv.QUOTE_ALL):
csvplus.move("example.csv", 0, 20) # move the first row to the 20th line
```
Raw data
{
"_id": null,
"home_page": "https://github.com/DanielJDufour/csvplus",
"name": "csvplus",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "create,crud,csv,delete,move,read,update",
"author": "Daniel J. Dufour",
"author_email": "daniel.j.dufour@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/8f/00/7d72308c15d238b9d2f02d00041487b97c905bce649075f8c24561214450/csvplus-0.0.2.tar.gz",
"platform": null,
"description": "# csvplus\n> Create, Read, Update, Delete, and Move Rows in a CSV File\n\n## install\n```sh\npip install csvplus\n```\n\n## usage\n```py\nimport csvplus\n\nfilepath = \"./folder/cars.csv\"\n\n# create csv with the given column names \ncsvplus.create(filepath, [\"make\",\"model\",\"year\"])\n\n# append a new row to the end of the csv file\ncsvplus.add(filepath, { \"make\": \"Kia\", \"model\": \"Soul\", \"year\": 2023 })\n\n# delete all rows matching the where conditions\ncsvplus.delete(filepath, where={ \"make\": \"Tesla\" })\n\n# find all rows matching the where conditions\ncsvplus.read(\"countries.csv\", where={ \"year\": 1776 })\n[{ \"name\": \"United States of Ameriac\", \"abbreviation\": \"USA\", \"year\": 1776 }]\n\n# move rows\nmove(filepath, from_row, to_row, debug_level=0, quoting=csv.QUOTE_ALL):\ncsvplus.move(\"example.csv\", 0, 20) # move the first row to the 20th line\n```\n",
"bugtrack_url": null,
"license": "",
"summary": "Create, Read, Update, Delete, and Move Rows in a CSV File",
"version": "0.0.2",
"split_keywords": [
"create",
"crud",
"csv",
"delete",
"move",
"read",
"update"
],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "6cd47cb10a89e38837275f4c155daaba",
"sha256": "dedbfa4e7534ca492ba5fa51c90563dbd8509a842200a1176e5e99ed67ee3ed4"
},
"downloads": -1,
"filename": "csvplus-0.0.2.tar.gz",
"has_sig": false,
"md5_digest": "6cd47cb10a89e38837275f4c155daaba",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 6580,
"upload_time": "2022-12-19T03:53:49",
"upload_time_iso_8601": "2022-12-19T03:53:49.899760Z",
"url": "https://files.pythonhosted.org/packages/8f/00/7d72308c15d238b9d2f02d00041487b97c905bce649075f8c24561214450/csvplus-0.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-12-19 03:53:49",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "DanielJDufour",
"github_project": "csvplus",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "csvplus"
}