jsonstream
Load multiple delimited JSON documents from a single string or file-like object.
This allows for storing multiple object roots to be stored in a single document,
but without having to load all the object roots from the document at once.
jsonstream does not even require that you have the entire document
immediately stored in memory. This allows you to stream objects from files
which are too large to store in memory, or from network connections.
Basic Usage
Retrieve objects from the document one at a time, or all at once.
from jsonstream import loads
>>> doc = '[1, 2, 3] {"some": "object"}\n null'
>>> it = loads(doc)
>>> next(it)
[1, 2, 3]
>>> list(it)
[{"some": "object"}, None]
Using file-like objects when the whole document is not immediately available
>>> from jsonstream import load
>>> from io import StringIO
>>> fh = StringIO('["first"] ["second"]')
>>> it = load(fh)
>>> next(it)
["first"]
>>> fh.write('["and", "a", "third"]')
>>> list(it)
[["second"], ["and", "a", "third"]]
Further documentation can be found on the doc strings of loads and load.
Metadata
Release files for jsonstream 0.0.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 | |
|---|---|---|---|---|
| jsonstream-0.0.1.tar.gz | 5.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jsonstream-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.2 kB
Release files / jsonstream-0.0.1.tar.gz
| Download URL | jsonstream-0.0.1.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1fde9fd4ee3a8ad028bbe91489c4544980c930974289f2409d964e35a5623543
|
|
BLAKE2b-256 checksum How to use checksums |
1051711ce898fe7d9f489cdb0e8a71f577ea00a4adbdb32d4e0bf9b4e0cc6bf8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5
|
Release files / jsonstream-0.0.1-py3-none-any.whl
| Download URL | jsonstream-0.0.1-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
63f30349d09a7b6fa5f628305914e40b99fe0e6aa303ccadb12fc52ea2c3e74e
|
|
BLAKE2b-256 checksum How to use checksums |
29d1d7df2f3048a5a0ea999ef46ff35a4c42721208f94fac8185f8072756b1aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5
|
Security for jsonstream 0.0.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.