--- id: csvw version: "4.1.0" license: Apache 2.0 license_treatment: permissive maintenance: active --- # csvw — Python library to work with CSVW described tabular data License: permissive · Maintenance: active · Downloads: 1.4M/mo ## What it is and what it does csvw is a Python library implementing the W3C CSV on the Web specification for reading, writing, and validating tabular data with structured metadata. It provides both a programmatic API for working with CSVW-described datasets and command-line tools (csvw2json, csvwvalidate, csvwdescribe) for common operations. The package handles CSV files with associated JSON metadata that describe table schemas, dialects, and data types, enabling structured interchange of tabular data with semantic meaning. The library passes 269 of 270 JSON tests and 280 of 282 validation tests from the W3C CSVW test suite, making it suitable for production use. It also bridges Frictionless Data specifications, allowing conversion between CSVW metadata and Data Package formats. Known limitations include UTF-8 BOM handling, CSV dialect edge cases with comment prefixes, and some escapechar round-tripping issues inherited from Python's standard csv module. Use it for: - Convert CSV files to JSON with full schema validation and type coercion using CSVW metadata - Validate CSV datasets against W3C CSVW specifications before processing or publishing - Generate CSVW metadata descriptors for raw CSV files with automatic schema inference - Migrate tabular data between Frictionless Data packages and W3C CSVW formats - Parse and read CSV files with complex, multi-table schemas and type constraints ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Reads, writes, and validates tabular data according to the CSV on the Web (CSVW) specification, with both a Python API and command-line tools for conversion and validation. Yes. csvw is actively maintained, has low install friction, carries no known vulnerabilities, and is licensed permissively. Install it if you need to work with W3C CSVW-described data, validate CSV against formal schemas, or bridge Frictionless Data and CSVW ecosystems. The 4.x API is not backward compatible with earlier versions, so verify your use case aligns with the current API before upgrading existing code. ## Install pip install csvw uv add csvw poetry add csvw ## Installing csvw Before you install: Low friction install with 9 runtime dependencies. Actively maintained with a release 39 days ago and recent commits. Supports Python 3.9 through 3.14 on both CPython and PyPy. License in practice: Distributed under Apache 2.0 (permissive), allowing commercial and private use with minimal restrictions beyond attribution. Quickstart: pip install csvw from csvw import CSVW import json data = CSVW('https://raw.githubusercontent.com/cldf/csvw/master/tests/fixtures/test.tsv') print(json.dumps(data.to_json(minimal=True), indent=4)) Requires Python >=3.9 Verify before relying: - Whether the 4.x API breaking changes affect your existing codebase (changelog referenced but not provided) - Performance characteristics with large CSV files or complex schemas - Full extent of Frictionless Data compatibility beyond conversion methods shown ## Package facts - License: Apache 2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 1.4M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags csv on the web, csvw validation, tabular data metadata, csv to json conversion, w3c csv standard, structured csv parsing, csv schema validation, w3c-standard, data-validation, tabular-data [View on SkillFed](https://skillfed.io/packages/csvw) · [View on PyPI](https://pypi.org/project/csvw/)