No project description provided
Project description
csvw
CSV on the Web
Links
- GitHub: https://github.com/cldf/csvw
- PyPI: https://pypi.org/project/csvw
- Issue Tracker: https://github.com/cldf/csvw/issues
Installation
This package runs under Python 2.7, and 3.4+, use pip to install:
$ pip install csvw
Example
>>> import csvw
>>> tg = csvw.TableGroup.from_file('tests/csv.txt-metadata.json')
>>> tg.check_referential_integrity()
>>> assert len(tg.tables) == 1
>>> assert tg.tables[0] is tg.tabledict['csv.txt']
>>> tg.tables[0].check_primary_key()
>>> from collections import OrderedDict
>>> row = next(tg.tables[0].iterdicts())
>>> assert row == OrderedDict([('ID', 'first'), ('_col.2', 'line')])
>>> assert len(list(tg.tables[0].iterdicts())) == 2
Known limitations
- We read all data which is specified as UTF-8 encoded using the
utf-8-sigcodecs. Thus, if such data starts withU+FEFFthis will be interpreted as BOM and skipped. - Low level CSV parsing is delegated to the
csvmodule in Python's standard library. Thus, if acommentPrefixis specified in aDialectinstance, this will lead to skipping rows where the first value starts withcommentPrefix, even if the value was quoted.
See also
- https://www.w3.org/2013/csvw/wiki/Main_Page
- https://github.com/CLARIAH/COW
- https://github.com/CLARIAH/ruminator
- https://github.com/bloomberg/pycsvw
- https://github.com/frictionlessdata/goodtables-py
- https://github.com/frictionlessdata/tableschema-py
- https://github.com/theodi/csvlint.rb
- https://github.com/ruby-rdf/rdf-tabular
- https://github.com/rdf-ext/rdf-parser-csvw
License
This package is distributed under the Apache 2.0 license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
csvw-1.4.5.tar.gz
(20.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
csvw-1.4.5-py2.py3-none-any.whl
(25.6 kB
view details)
File details
Details for the file csvw-1.4.5.tar.gz.
File metadata
- Download URL: csvw-1.4.5.tar.gz
- Upload date:
- Size: 20.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.5.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31dd64fd6242d49121d6742ff3d092e951edf99c61275f9c75aba7a17a95cd77
|
|
| MD5 |
79c98f961d967f44af765d57bde04f32
|
|
| BLAKE2b-256 |
9a611d537e502b40cc7d0c5808358b740b83829cf7c12daa0b69b1d0373b28ac
|
File details
Details for the file csvw-1.4.5-py2.py3-none-any.whl.
File metadata
- Download URL: csvw-1.4.5-py2.py3-none-any.whl
- Upload date:
- Size: 25.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.5.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4b31939fd27736234529702caf6b3411da2b239e0181b960416f76ab0559bd2
|
|
| MD5 |
1ad3c51b2ddb290828c59f4aa7daa3cf
|
|
| BLAKE2b-256 |
f0508e17cb8e7997803e6ab57e79acff5c1b88718b946cbbde476032c52a02b7
|