iterable-serialization
Serialization/deserialization of iterables of type str.
This package aims to be a better version of:
serialized = "|".join(("a", "b", "c"))
print(serialized)
# a|b|c
deserialized = serialized.split("|")
print(deserialized)
# ['a', 'b', 'c']
It makes it possible to serialize/deserialize an iterable with occurring symbols as separator:
serialized = serialize_iterable(("a", "b", "c"), "a")
print(serialized)
# aabac
deserialized = deserialize_iterable(serialized, "a")
print(list(deserialized))
# ['a', 'b', 'c']
With the version above, it would result in a wrong deserialization result:
serialized = "a".join(("a", "b", "c"))
print(serialized)
# aabac
deserialized = serialized.split("a")
print(list(deserialized))
# ['', '', 'b', 'c']
Installation
pipenv install -e git+https://github.com/stefantaubert/iterable-serialization.git@master#egg=iterable_serialization
Usage
from iterable_serialization import deserialize_iterable, serialize_iterable
serialized = serialize_iterable(("a", "b", "c"), "a")
print(serialized)
# aabac
deserialized = deserialize_iterable(serialized, "a")
print(list(deserialized))
# ['a', 'b', 'c']
Metadata
Release files for iterable-serialization 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 | Actions |
|---|---|---|---|---|
| iterable-serialization-0.0.1.tar.gz | 3.6 kB | Without provenance | Details for iterable-serialization-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| iterable_serialization-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for iterable_serialization-0.0.1-py3-none-any.whl |
Total release size: 7.4 kB
Release files / iterable-serialization-0.0.1.tar.gz
| Download URL | iterable-serialization-0.0.1.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
29dd698e6537fde4361a2ba360ec98b4922003f4c177fd4d5db75fa78e087386
|
|
BLAKE2b-256 checksum How to use checksums |
e224c97e6f2470e072596a11036a151b2e34079a43f1468236d143a6226ffcc4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.8.10
|
Release files / iterable_serialization-0.0.1-py3-none-any.whl
| Download URL | iterable_serialization-0.0.1-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bfe3eb07287085a3051235c5b4acd0daa98b4af8c97c66b1395ecb849ea2eb38
|
|
BLAKE2b-256 checksum How to use checksums |
95f99bb5fa5db4756fa9a4408da072fdaaaae86e0ac52cd71b6cca3f857efb46
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.8.10
|
Security for iterable-serialization 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.