{"id":26366743,"url":"https://github.com/stifskere/simplecsvparser","last_synced_at":"2025-03-16T20:46:13.243Z","repository":{"id":227332735,"uuid":"771115308","full_name":"stifskere/SimpleCSVParser","owner":"stifskere","description":"A simple Python CSV parser.","archived":false,"fork":false,"pushed_at":"2024-03-13T00:25:27.000Z","size":19,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-21T18:17:20.067Z","etag":null,"topics":["csv","python","serializer"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/SimpleCSVParser","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stifskere.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-03-12T17:59:51.000Z","updated_at":"2024-03-14T15:09:29.000Z","dependencies_parsed_at":"2024-03-12T19:48:13.799Z","dependency_job_id":"66feb243-a713-4794-9df5-005741e77b87","html_url":"https://github.com/stifskere/SimpleCSVParser","commit_stats":null,"previous_names":["stifskere/simplecsvparser"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stifskere%2FSimpleCSVParser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stifskere%2FSimpleCSVParser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stifskere%2FSimpleCSVParser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stifskere%2FSimpleCSVParser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stifskere","download_url":"https://codeload.github.com/stifskere/SimpleCSVParser/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243933358,"owners_count":20370989,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csv","python","serializer"],"created_at":"2025-03-16T20:46:12.770Z","updated_at":"2025-03-16T20:46:13.227Z","avatar_url":"https://github.com/stifskere.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple CSV parser\n\nThis is a simple package designed to serialize and deserialize CSV.\n\n### Installing\n\nUse Python PIP\n\n```bash\npip install SimpleCSVParser\n```\n\n### Usage\n\nThe package contains a single class which is `CSVFile` that represents a CSV file.\n\n```py\n# you can use CSVInitError for catching exceptions, \n# it's the only exception thrown by the library.\nfrom SimpleCSVParser import CSVHandle, CSVInitError\n\n\n# create a new instance from a file.\nparsed_csv: CSVHandle = CSVHandle.from_file(\"my_csv_file.csv\")\n# you can also create a new instance from a raw string.\nparsed_csv = CSVHandle(\"your;csv;here\\n1;2;3\")\n\n# You can also specify the separator in a second arugment.\nparsed_csv: CSVHandle = CSVHandle.from_file(\"my_csv_file.csv\", ';')\nparsed_csv = CSVHandle(\"your;csv;here\\n1;2;3\", ';')\n\n# or initializing from an array\nparsed_csv: CSVHandle = CSVHandle.from_array([\"first\", \"second\"], [1, 2])\n\n# Obtain a specific element, the second argument being \n# the row number not taking the column name into account.\nparsed_csv[(\"Column Name\", 0)]\n\n# Obtain a list[list[any]] of the serialized CSV, the first\n# column being the column names so, row[column[any]].\nparsed_csv.get_raw()\n\n# Obtain a string from the CSV instance.\nparsed_csv.to_string()\n\n# You can optionally specify if it's going to add the \n# separator specifier if so, it's going to append \n# \"sep={separator}\" to the start.\nparsed_csv.to_string(True) # default being true.\n\n# There is also a shortcut for writing the CSV to a file.\nparsed_csv.write_to_file(\"./path_to_file.csv\")\n\n# And of course define if it's going to specify the separator.\nparsed_csv.write_to_file(\"./path_to_file.csv\", True) # default being true.\n```\n\n### Contributing\n\nYou can make a pull request, and it will be checked as soon as possible.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstifskere%2Fsimplecsvparser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstifskere%2Fsimplecsvparser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstifskere%2Fsimplecsvparser/lists"}