{"id":13557677,"url":"https://github.com/cldf/csvw","last_synced_at":"2026-04-02T00:27:45.155Z","repository":{"id":38416956,"uuid":"110715532","full_name":"cldf/csvw","owner":"cldf","description":"CSV on the web","archived":false,"fork":false,"pushed_at":"2026-03-25T10:33:44.000Z","size":649,"stargazers_count":48,"open_issues_count":1,"forks_count":6,"subscribers_count":9,"default_branch":"master","last_synced_at":"2026-03-26T13:41:15.251Z","etag":null,"topics":["csv","csvw","python","tabular-data"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cldf.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES","contributing":"CONTRIBUTING.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-11-14T16:26:25.000Z","updated_at":"2026-03-25T10:33:50.000Z","dependencies_parsed_at":"2025-10-07T12:09:58.427Z","dependency_job_id":"32313c8f-5b3d-4cd2-8cbd-3b9cf8e35047","html_url":"https://github.com/cldf/csvw","commit_stats":{"total_commits":224,"total_committers":4,"mean_commits":56.0,"dds":0.2857142857142857,"last_synced_commit":"d8bec84d3f5f6327e18ff14ae3588d50883b4d05"},"previous_names":[],"tags_count":43,"template":false,"template_full_name":null,"purl":"pkg:github/cldf/csvw","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cldf%2Fcsvw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cldf%2Fcsvw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cldf%2Fcsvw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cldf%2Fcsvw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cldf","download_url":"https://codeload.github.com/cldf/csvw/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cldf%2Fcsvw/sbom","scorecard":{"id":285770,"data":{"date":"2025-08-11","repo":{"name":"github.com/cldf/csvw","commit":"c310053a2a3c03b1c356ac73bce850fa189e6af1"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.8,"checks":[{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/python-package.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-package.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/cldf/csvw/python-package.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-package.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/cldf/csvw/python-package.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/python-package.yml:27","Warn: pipCommand not pinned by hash: .github/workflows/python-package.yml:28","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}}]},"last_synced_at":"2025-08-17T17:12:07.419Z","repository_id":38416956,"created_at":"2025-08-17T17:12:07.419Z","updated_at":"2025-08-17T17:12:07.419Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31293376,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T21:15:39.731Z","status":"ssl_error","status_checked_at":"2026-04-01T21:15:34.046Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","csvw","python","tabular-data"],"created_at":"2024-08-01T12:04:29.070Z","updated_at":"2026-04-02T00:27:45.145Z","avatar_url":"https://github.com/cldf.png","language":"Python","funding_links":[],"categories":["Python","python"],"sub_categories":[],"readme":"# csvw\n\n[![Build Status](https://github.com/cldf/csvw/workflows/tests/badge.svg)](https://github.com/cldf/csvw/actions?query=workflow%3Atests)\n[![PyPI](https://img.shields.io/pypi/v/csvw.svg)](https://pypi.org/project/csvw)\n[![Documentation Status](https://readthedocs.org/projects/csvw/badge/?version=latest)](https://csvw.readthedocs.io/en/latest/?badge=latest)\n\n\nThis package provides\n- a Python API to read and write relational, tabular data according to the [CSV on the Web](https://csvw.org/) specification and \n- commandline tools for reading and validating CSVW data.\n\n\u003e [!IMPORTANT]  \n\u003e The Python API provided by `csvw` 4.x is not fully backwards compatible with `csvw` \u003c 4.\n\u003e See [CHANGES](CHANGES) for more information.\n\n\n## Links\n\n- GitHub: https://github.com/cldf/csvw\n- PyPI: https://pypi.org/project/csvw\n- Issue Tracker: https://github.com/cldf/csvw/issues\n\n\n## Installation\n\nThis package runs under Python \u003e=3.9, use pip to install:\n\n```bash\n$ pip install csvw\n```\n\n\n## CLI\n\n### `csvw2json`\n\nConverting CSVW data [to JSON](https://www.w3.org/TR/csv2json/)\n\n```shell\n$ csvw2json tests/fixtures/zipped-metadata.json \n{\n    \"tables\": [\n        {\n            \"url\": \"tests/fixtures/zipped.csv\",\n            \"row\": [\n                {\n                    \"url\": \"tests/fixtures/zipped.csv#row=2\",\n                    \"rownum\": 1,\n                    \"describes\": [\n                        {\n                            \"ID\": \"abc\",\n                            \"Value\": \"the value\"\n                        }\n                    ]\n                },\n                {\n                    \"url\": \"tests/fixtures/zipped.csv#row=3\",\n                    \"rownum\": 2,\n                    \"describes\": [\n                        {\n                            \"ID\": \"cde\",\n                            \"Value\": \"another one\"\n                        }\n                    ]\n                }\n            ]\n        }\n    ]\n}\n```\n\n### `csvwvalidate`\n\nValidating CSVW data\n\n```shell\n$ csvwvalidate tests/fixtures/zipped-metadata.json \nOK\n```\n\n### `csvwdescribe`\n\nDescribing tabular-data files with CSVW metadata\n\n```shell\n$ csvwdescribe --delimiter \"|\" tests/fixtures/frictionless-data.csv\n{\n    \"@context\": \"http://www.w3.org/ns/csvw\",\n    \"dc:conformsTo\": \"data-package\",\n    \"tables\": [\n        {\n            \"dialect\": {\n                \"delimiter\": \"|\"\n            },\n            \"tableSchema\": {\n                \"columns\": [\n                    {\n                        \"datatype\": \"string\",\n                        \"name\": \"FK\"\n                    },\n                    {\n                        \"datatype\": \"integer\",\n                        \"name\": \"Year\"\n                    },\n                    {\n                        \"datatype\": \"string\",\n                        \"name\": \"Location name\"\n                    },\n                    {\n                        \"datatype\": \"string\",\n                        \"name\": \"Value\"\n                    },\n                    {\n                        \"datatype\": \"string\",\n                        \"name\": \"binary\"\n                    },\n                    {\n                        \"datatype\": \"string\",\n                        \"name\": \"anyURI\"\n                    },\n                    {\n                        \"datatype\": \"string\",\n                        \"name\": \"email\"\n                    },\n                    {\n                        \"datatype\": \"string\",\n                        \"name\": \"boolean\"\n                    },\n                    {\n                        \"datatype\": {\n                            \"dc:format\": \"application/json\",\n                            \"base\": \"json\"\n                        },\n                        \"name\": \"array\"\n                    },\n                    {\n                        \"datatype\": {\n                            \"dc:format\": \"application/json\",\n                            \"base\": \"json\"\n                        },\n                        \"name\": \"geojson\"\n                    }\n                ]\n            },\n            \"url\": \"tests/fixtures/frictionless-data.csv\"\n        }\n    ]\n}\n```\n\n\n## Python API\n\nFind the Python API documentation at [csvw.readthedocs.io](https://csvw.readthedocs.io/en/latest/).\n\nA quick example for using `csvw` from Python code:\n\n```python\nimport json\nfrom csvw import CSVW\ndata = CSVW('https://raw.githubusercontent.com/cldf/csvw/master/tests/fixtures/test.tsv')\nprint(json.dumps(data.to_json(minimal=True), indent=4))\n[\n    {\n        \"province\": \"Hello\",\n        \"territory\": \"world\",\n        \"precinct\": \"1\"\n    }\n]\n```\n\n\n## Known limitations\n\n- We read **all** data which is specified as UTF-8 encoded using the \n  [`utf-8-sig` codecs](https://docs.python.org/3/library/codecs.html#module-encodings.utf_8_sig).\n  Thus, if such data starts with `U+FEFF` this will be interpreted as [BOM](https://en.wikipedia.org/wiki/Byte_order_mark)\n  and skipped.\n- Low level CSV parsing is delegated to the `csv` module in Python's standard library. Thus, if a `commentPrefix`\n  is specified in a `Dialect` instance, this will lead to skipping rows where the first value starts\n  with `commentPrefix`, **even if the value was quoted**.\n- Also, cell content containing `escapechar` may not be round-tripped as expected (when specifying\n  `escapechar` or a `csvw.Dialect` with `quoteChar` but `doubleQuote==False`),\n  when minimal quoting is specified. This is due to inconsistent `csv` behaviour\n  across Python versions (see https://bugs.python.org/issue44861).\n\n\n## CSVW conformance\n\nWhile we use the CSVW specification as guideline, this package does not (and \nprobably never will) implement the full extent of this spec.\n\n- When CSV files with a header are read, columns are not matched in order with\n  column descriptions in the `tableSchema`, but instead are matched based on the\n  CSV column header and the column descriptions' `name` and `titles` atributes.\n  This allows for more flexibility, because columns in the CSV file may be\n  re-ordered without invalidating the metadata. A stricter matching can be forced\n  by specifying `\"header\": false` and `\"skipRows\": 1` in the table's dialect\n  description.\n\nHowever, `csvw.CSVW` works correctly for\n- 269 out of 270 [JSON tests](https://w3c.github.io/csvw/tests/#manifest-json),\n- 280 out of 282 [validation tests](https://w3c.github.io/csvw/tests/#manifest-validation),\n- 10 out of 18 [non-normative tests](https://w3c.github.io/csvw/tests/#manifest-nonnorm)\n\nfrom the [CSVW Test suites](https://w3c.github.io/csvw/tests/).\n\n\n## Compatibility with [Frictionless Data Specs](https://specs.frictionlessdata.io/)\n\nA CSVW-described dataset is basically equivalent to a Frictionless DataPackage where all \n[Data Resources](https://specs.frictionlessdata.io/data-resource/) are [Tabular Data](https://specs.frictionlessdata.io/tabular-data-resource/).\nThus, the `csvw` package provides some conversion functionality. To\n\"read CSVW data from a Data Package\", there's the `csvw.TableGroup.from_frictionless_datapackage` method:\n```python\nfrom csvw import TableGroup\ntg = TableGroup.from_frictionless_datapackage('PATH/TO/datapackage.json')\n```\nTo convert the metadata, the `TableGroup` can then be serialzed:\n```python\ntg.to_file('csvw-metadata.json')\n```\n\nNote that the CSVW metadata file must be written to the Data Package's directory\nto make sure relative paths to data resources work.\n\nThis functionality - together with the schema inference capabilities\nof [`frictionless describe`](https://framework.frictionlessdata.io/docs/guides/describing-data/) - provides\na convenient way to bootstrap CSVW metadata for a set of \"raw\" CSV\nfiles, implemented in the [`csvwdescribe` command described above](#csvwdescribe).\n\n\n## See also\n\n- https://www.w3.org/2013/csvw/wiki/Main_Page\n- https://csvw.org\n- https://github.com/CLARIAH/COW\n- https://github.com/CLARIAH/ruminator\n- https://github.com/bloomberg/pycsvw\n- https://specs.frictionlessdata.io/table-schema/\n- https://github.com/theodi/csvlint.rb\n- https://github.com/ruby-rdf/rdf-tabular\n- https://github.com/rdf-ext/rdf-parser-csvw\n- https://github.com/Robsteranium/csvwr\n\n\n## License\n\nThis package is distributed under the [Apache 2.0 license](https://opensource.org/licenses/Apache-2.0).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcldf%2Fcsvw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcldf%2Fcsvw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcldf%2Fcsvw/lists"}