Skip to main content
# CSV Parse

CSV Parse is a simple state-machine based approach to parsing CSV files. Its creation was motivated after dealing with some CSV parsers that could not properly handle strings with null bytes. It is not very fast, and definitely not very memory efficient, but if you want to explore simple CSV parsing, look no further. If you have CSV files that are incorrectly formatted, you can pretty easily modify the code to patch them up.

## Usage

CSV parse supports reading from files or a buffer.

### Reading Files

```python
from csv_parse import read

data = read("/home/user/foo.txt")
```

### Reading a buffer

```python
from csv_parse import parse

my_string = 'foo,bar\nbaz,bat'
size = len(my_string)
data = parse(my_string, size)
```

CSV Parse also supports escaping, custom delimiters and newlines, and custom quoting.

```python
data = read("/home/user/foo.txt", field_separator=',', null_as="", newline="\n", quote='"')
```


# Changelog

## 0.0.2

* Markdown for the Markdown parsing gods

## 0.0.1

* Initial Release

Download files

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

Source Distribution

csvparse-0.0.2.tar.gz (3.1 kB view details)

Uploaded Source

Built Distributions

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

csvparse-0.0.2-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

csvparse-0.0.2-py2-none-any.whl (2.5 kB view details)

Uploaded Python 2

File details

Details for the file csvparse-0.0.2.tar.gz.

File metadata

  • Download URL: csvparse-0.0.2.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for csvparse-0.0.2.tar.gz
Algorithm Hash digest
SHA256 56f26e7ccbf71e519b344b9fd74304348c3359a8cad51a99d5af1b3c7150ef1c
MD5 506748aa1c6d2b9b2973bd604ce69285
BLAKE2b-256 0702c0f0d85932ecdc553ea9b9ea1acf54eaad80e8bc3f7438922e1c341a02e7

See more details on using hashes here.

File details

Details for the file csvparse-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for csvparse-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c68e2632757d0bf406e5d591a626515714929a65b2efa5cac959c23d5c8e151a
MD5 67d60beb50c304ce1435ad736426c551
BLAKE2b-256 b8d6d0ec7385e591463abe53421ff593eab56acfd937fb350b51aad4adf93223

See more details on using hashes here.

File details

Details for the file csvparse-0.0.2-py2-none-any.whl.

File metadata

File hashes

Hashes for csvparse-0.0.2-py2-none-any.whl
Algorithm Hash digest
SHA256 8f4f8653989f58d346deed40e13a7b9492630b93d77fab9dc6ded4470840b0b8
MD5 8f506bff721b4aaf0fbfde2a1946da98
BLAKE2b-256 45ff783c36ef65e16d4efb83adf5e240d613c1ed7e2d895aeda66818038239ae

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