This is an structured text parser.
format
example 1:
source:
[Q] This is a question. [A] This is an answer. [Q] This is a question2. # This is comment [A] This is an answer2.
parsed:
[
{
'Q': 'This is a question.',
'A': 'This is an answer.',
},
{
'Q': 'This is a question2.',
'A': 'This is an answer2.',
},
]
If the same key appeared, Next record.
Actuary, output is OrderedDict list. Not Dict list.
source:
[Key1] Value1 [Key2] Value2 ---- [Key3] Value3 next line next line [Key4] Value4 4! [Key5] Value5
parsed:
[
{
'Key1': 'Value1',
'Key2': 'Value2',
},
{
'Key3': 'Value3\nnext line\nnext line',
'Key4': 'Value4 4!',
'Key5': 'Value5',
}
Whitespace trimmed.
“—-” (Hyphens >= 4) is list separator.
usage
import verticaltable
fp = open('sample.txt')
parsed_list = verticaltable.loads(fp.read())
parsed_list2 = verticaltable.load(open('sample2.txt'))
Metadata
Release files for verticaltable 0.1.0
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 | |
|---|---|---|---|---|
| verticaltable-0.1.0.tar.gz | 1.7 kB | Without provenance | Details |
Release files / verticaltable-0.1.0.tar.gz
| Download URL | verticaltable-0.1.0.tar.gz |
|---|---|
| Size | 1.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
11b317ba265be7fa10c37383291d52bfdad06c7f447dcfc1547b9672e9904821
|
|
BLAKE2b-256 checksum How to use checksums |
b038a95766ced9a8cdc41adf0ef547395e67c27a0fd8595a9a84d562166c5018
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for verticaltable 0.1.0
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.