Python Separator Separated Values Package
Summary
SSV stands for separator-separated values. It sounds like a joke, but it can actually be useful.
Description
SSV is a format for saving tabular data (flat-file databases) as delimiter-separated values in a plain text file. In contrast to other formats, e.g. CSV or TSV, delimiter collision is virtually impossible. Instead of using commas (CSV), tabs (TSV) and newlines, SSV relies on the record separator RS and the unit separator US for data structuring, which should not occur at all in textual data.
The format is an example of ASCII delimited text. As there is no official standard, SSV makes decisions that might be considered controversial. In general, simplicity and ease of implementation are preferred to other considerations. For example, SSV does not support escaping of RS and US.
Format
SSV files can be formally described by the following W3C EBNF:
SSV ::= Record (RS Record)*
Record ::= Unit (US Unit)*
Unit ::= UnitChar*
UnitChar ::= Char - (RS | US)
Char ::= /* see http://www.w3.org/TR/xml#NT-Char */
RS ::= #x1E
US ::= #x1F
Table records (rows) are separated by the record separator RS. Each record contains one or more units (fields), which are separated by the unit separator US. A unit may contain zero or more characters, excluding RS and US. As a consequence, an empty file is a valid SSV file and represents a 1-by-1 table containing a single empty field.
API Example
import ssv
# simple table
table = [['A1', 'B1', 'C1'],
['A2', 'B2', 'C2']]
# encode table as SSV string
ssv.dumps(table) # 'A1\x1fB1\x1fC1\x1eA2\x1fB2\x1fC2'
# write table to SSV file
ssv.dumpf(table, 'data.ssv')
# load table from SSV file
new_table = ssv.loadf('data.ssv')
assert table == new_table
History
0.1.1 (2016-05-29)
Improve documentation.
0.1.0 (2016-05-29)
First release on PyPI.
Metadata
Release files for ssv 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ssv-0.1.1.tar.gz | 5.2 kB | Without provenance | Details for ssv-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ssv-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for ssv-0.1.1-py3-none-any.whl |
Total release size: 12.1 kB
Release files / ssv-0.1.1.tar.gz
| Download URL | ssv-0.1.1.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8eed40bd37312516d619efd681603a1b29ee50d796c424ed7d6e64c1e8689454
|
|
BLAKE2b-256 checksum How to use checksums |
b58c0ff5ebc89e2d01c3fb0806e9aa27f18fd7ef71f36a7e5f8ab9dba3a40330
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / ssv-0.1.1-py3-none-any.whl
| Download URL | ssv-0.1.1-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
66062f95f42bfcc3378580c5171b1497335dc4179e7255b4ff8fa85acce44871
|
|
BLAKE2b-256 checksum How to use checksums |
3a3ba12b18448711355d6ef172d5c9cf28d19570d7fbf7272214b840f1bb36c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for ssv 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.