Streamed YAML
Parse streamed (incomplete) single-level YAML
pip install streamed-yaml
Partial Parsing
Parse a partial, single-level YAML document. Returns values, done, where done[key] indicated whether values[key] is fully parsed.
from streamed_yaml import parse
parse('key: value') # { 'key': 'value }, { 'key': False }` (values, done)
parse('''
key: value
key2
''') # { 'key': 'value }, { 'key': True }
parse('''
key: value
key2:
''') # { 'key': 'value', 'key2': '' }, { 'key': True, 'key2': False }
parse('''
key: value
key2: "Val...
''') # { 'key': 'value', 'key2': 'Val...' }, { 'key': True, 'key2': False }
Streaming Updates
Parse an arbitrarily chunked stream of single-level YAML. Yields updates at the end of each chunk, s.t. concatenating them yields the full document.
from streamed_yaml import chunked_parse
async def stream():
yield 'key' # no update
yield ': value' # -> Update(key='key', value='value', done=False)
yield '\nke' # -> Update(key='key', value='', done=True)
yield 'y2: ' # -> Update(key='key2', value='', done=False)
yield 'value2\n' # -> Update(key='key2', value='value2', done=True)
async for update in chunked_parse(stream()):
print(update)
Metadata
Release files for streamed-yaml 0.1.3
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 |
|---|---|---|---|---|
| streamed_yaml-0.1.3.tar.gz | 3.2 kB | Without provenance | Details for streamed_yaml-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| streamed_yaml-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for streamed_yaml-0.1.3-py3-none-any.whl |
Total release size: 7.2 kB
Release files / streamed_yaml-0.1.3.tar.gz
| Download URL | streamed_yaml-0.1.3.tar.gz |
|---|---|
| Size | 3.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d01ea7527b31197941bb02d75bcd1b720651fbb639445dde96b2ace1c21e886b
|
|
BLAKE2b-256 checksum How to use checksums |
4f3a558393877c655b91760702716ff12a510bed98ccc0d80a2b30c7163fa577
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.10
|
Release files / streamed_yaml-0.1.3-py3-none-any.whl
| Download URL | streamed_yaml-0.1.3-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
45a0f7aad1067261e9184f098868953195216326e865d0abdcd2754f4385b7b6
|
|
BLAKE2b-256 checksum How to use checksums |
70fa5b1bc08c67286c254abf0c7ea230266dbdf62eafe99e2df94e983cc028e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.10
|
Security for streamed-yaml 0.1.3
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.