Skip to main content
# CSV Parse

CSV Parse is a simple state-machine based approach to parsing CSV files. It's 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.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.1.tar.gz (3.0 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.1-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

csvparse-0.0.1-py2-none-any.whl (2.4 kB view details)

Uploaded Python 2

File details

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

File metadata

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

File hashes

Hashes for csvparse-0.0.1.tar.gz
Algorithm Hash digest
SHA256 7886b048976bbaa5460dc0f1054c5b2bea0cf0d1b72680184c2007e4f5f7df1d
MD5 8cb70b74dcf590c1d6517492c5792c64
BLAKE2b-256 179f848a7c5fde98b2d10e5aaa6aefe9f1d29453fd26070314c9adaffce8bffa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for csvparse-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0f682d166fec580c6b5f0c683f5287529d052b6996ed5e8a41719dcccd5c435b
MD5 ec540533757ddf84defa3aba7534b7a4
BLAKE2b-256 7cbc20184a548aa24836b00b86ec130959694da49d19dcde5b089a0f41a31b62

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for csvparse-0.0.1-py2-none-any.whl
Algorithm Hash digest
SHA256 9eb4e790b93c09e9bbcf477ba166457a38cf97e19c53296ffecff9bbfcc4260c
MD5 c82d47f6e1d1f9ad4486df82de231174
BLAKE2b-256 d7b643dbd6cae6548e6993cb38b07c4ee8e744e574aae5bf78b333e0ade4c1ee

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 Sentry Error logging StatusPage Status page