{"id":26100548,"url":"https://github.com/djoezeke/csvee","last_synced_at":"2026-04-20T12:06:02.891Z","repository":{"id":281279465,"uuid":"944784158","full_name":"djoezeke/csvee","owner":"djoezeke","description":"Light-weight, Simple and fast Modern Csv parser and encoder for C/C++ with TSV support.","archived":false,"fork":false,"pushed_at":"2025-03-08T01:35:03.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-08T02:24:34.509Z","etag":null,"topics":["c","cpp","csv","csv-parser","csv-reader","parse","parser","streaming","tsv-parser"],"latest_commit_sha":null,"homepage":"","language":"C","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/djoezeke.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,"publiccode":null,"codemeta":null}},"created_at":"2025-03-08T00:41:45.000Z","updated_at":"2025-03-08T01:35:07.000Z","dependencies_parsed_at":"2025-03-08T02:24:40.317Z","dependency_job_id":null,"html_url":"https://github.com/djoezeke/csvee","commit_stats":null,"previous_names":["djoezeke/csvee"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djoezeke%2Fcsvee","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djoezeke%2Fcsvee/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djoezeke%2Fcsvee/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djoezeke%2Fcsvee/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/djoezeke","download_url":"https://codeload.github.com/djoezeke/csvee/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242729460,"owners_count":20175945,"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":["c","cpp","csv","csv-parser","csv-reader","parse","parser","streaming","tsv-parser"],"created_at":"2025-03-09T17:39:22.940Z","updated_at":"2026-04-20T12:06:02.860Z","avatar_url":"https://github.com/djoezeke.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CSV Parser in C 📄\n\nMyCSV is a simple C library for parsing, creating, and printing CSV files.\nIt provides functions to create and manage CSV fields, rows, and files, as well as to parse CSV files from disk and print them to the console.\nThe parser reads a CSV file and stores the data in a structured format, allowing easy access and manipulation of the CSV data.\n\n## Csvee Data Structures 🗂️\n\n### `Csvee`\n\nA structure to hold the parsed CSV data.\n\n```c\ntypedef struct Csvee {\n    CsvRow *rows;\n    size_t count;\n} Csvee;\n```\n\n- `rows`: A 2D array of strings representing the CSV data.\n- `count`: The number of rows in the CSV data.\n\n## Features ✨\n\n- Parses CSV files with support for quoted fields and escaped quotes.\n- Dynamically allocates memory to handle CSV files of varying sizes.\n- Provides functions to free the allocated memory.\n- 📄 Create and manage CSV fields, rows, and files\n- 📥 Parse CSV files from disk\n- 🖨️ Print CSV files to the console\n- 💾 Write CSV files to disk\n\n## Files 📂\n\n- `csvee.h`: Contains the implementation of the CSV parser\n- `sample.c` contains `main` function to demonstrate its usage.\n\n## 🛠️ Installation\n\nTo use the MyCSV library, simply include the `csvee.h` header file in your project and compile your code with it.\n\n```c\n#include \"csvee.h\"\n```\n\n## Usage 🚀\n\n### 📝 Creating a Csvee\n\nYou can create a CSV file in memory using the provided functions:\n\n```c\n#include \"csvee.h\"\n\nint main()\n{\n    // Create a CSV file with 2 rows\n    Csvee file = csvee_create_file(2);\n\n    // Create the first row with 3 fields\n    file.rows[0] = csvee_create_row(3);\n    file.rows[0].fields[0] = csvee_create_field(\"Name\");\n    file.rows[0].fields[1] = csvee_create_field(\"Age\");\n    file.rows[0].fields[2] = csvee_create_field(\"Occupation\");\n\n    // Create the second row with 3 fields\n    file.rows[1] = csvee_create_row(3);\n    file.rows[1].fields[0] = csvee_create_field(\"John Doe\");\n    file.rows[1].fields[1] = csvee_create_field(\"30\");\n    file.rows[1].fields[2] = csvee_create_field(\"Software Engineer\");\n\n    // Print the CSV file\n    csvee_print(\u0026file);\n\n    // Free the CSV file\n    csvee_free_csv(\u0026file);\n\n    return 0;\n}\n```\n\n### 📥 Reading a CSV File to Csvee.\n\nYou can parse a CSV file from disk using the `csv_read_from_csv` function:\n\n```c\n#include \"csvee.h\"\n\nint main()\n{\n    // Parse the CSV file from \"example.csv\"\n    CsvFile file = csv_read_from_csv(\"example.csv\");\n\n    // Print the parsed CSV file\n    csv_print(\u0026file);\n\n    // Free the CSV file\n    csv_free_file(\u0026file);\n\n    return 0;\n}\n```\n\n### 💾 Writing a Cvee to Csv File.\n\nYou can write a CSV file to disk using the `csvee_write_to_csv` function:\n\n```c\n#include \"csvee.h\"\n\nint main()\n{\n    // Create a CSV file with 2 rows\n    CsvFile file = csv_create_file(2);\n\n    // Create the first row with 3 fields\n    file.rows[0] = csv_create_row(3);\n    file.rows[0].fields[0] = csv_create_field(\"Name\");\n    file.rows[0].fields[1] = csv_create_field(\"Age\");\n    file.rows[0].fields[2] = csv_create_field(\"Occupation\");\n\n    // Create the second row with 3 fields\n    file.rows[1] = csv_create_row(3);\n    file.rows[1].fields[0] = csv_create_field(\"John Doe\");\n    file.rows[1].fields[1] = csv_create_field(\"30\");\n    file.rows[1].fields[2] = csv_create_field(\"Software Engineer\");\n\n    // Write the CSV file to \"output.csv\"\n    if (csv_write_to_csv(\u0026file, \"output.csv\"))\n    {\n        printf(\"CSV file written successfully to output.csv\\n\");\n    }\n    else\n    {\n        printf(\"Failed to write CSV file to output.csv\\n\");\n    }\n\n    // Free the CSV file\n    csv_free_file(\u0026file);\n\n    return 0;\n}\n```\n\n## License 📜\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjoezeke%2Fcsvee","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdjoezeke%2Fcsvee","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjoezeke%2Fcsvee/lists"}