Skip to main content

A csv parser. Can be advised to clean columns by type too...

Project description

csvlineparser

Based on https://secondboyet.com/articles/csvparser.html by Julian M Bucknall, rewritten in Python by raoulsson.

BNF Grammar:

csvFile ::= (csvRecord)* 'EOF'
csvRecord ::= csvStringList ('\n' | 'EOF')
csvStringList ::= rawString [',' csvStringList]
rawString := optionalSpaces [rawField optionalSpaces)]
optionalSpaces ::= whitespace*
whitespace ::= ' ' | '\t'
rawField ::= simpleField | quotedField 
simpleField ::= (any char except \n, EOF, \t, space, comma or double quote)+
quotedField ::= '"' escapedField '"'
escapedField ::= subField ['"' '"' escapedField]
subField ::= (any char except double quote or EOF)+

Intsallation

pip install csvlineparser

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

csvlineparser-0.0.4.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

csvlineparser-0.0.4-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file csvlineparser-0.0.4.tar.gz.

File metadata

  • Download URL: csvlineparser-0.0.4.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.12

File hashes

Hashes for csvlineparser-0.0.4.tar.gz
Algorithm Hash digest
SHA256 4e97e176a23fb22e051f53f1a6b8bd6a3e2f314314073692f9118719b40da25f
MD5 b2e99418c77d27139b89c3b0e625a6d2
BLAKE2b-256 0737dfeec10c2f2c1acb363e0e35deb378c11cb1596734d83c394d1079c6c287

See more details on using hashes here.

File details

Details for the file csvlineparser-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: csvlineparser-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.12

File hashes

Hashes for csvlineparser-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 bb7443b119437cec9faa160317db496347385b51174c71baa93989f6f1dd26c0
MD5 0cf5c0e19418b46187bd9b31498933c9
BLAKE2b-256 54d44660f95ec9f224ad4c6d11c0038ba6a9539c84bc93987719ff947f604d79

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page