serp-zipfile
ZIP archives for Serpentine: read and write archives with stored (method 0) and DEFLATE (method 8) entries, UTF-8 names and CRC-verified extraction. Pure Serpentine ([P]) over serp-zlib — the same source dual-runs under CPython.
from serp_zipfile import ZipEntry, zip_write, zip_read, zip_extract, zip_names
from serpentine import move
entries: list[ZipEntry] = []
e: ZipEntry = ZipEntry("hello.txt", b"hello zip")
entries.append(move(e))
zip_write("out.zip", entries, True)
back: list[ZipEntry] = zip_read("out.zip")
print(zip_names(back))
print(zip_extract(back, "hello.txt"))
API
ZipEntry(name: str, data: bytes)— one archive memberzip_bytes(entries, compress) -> bytes/zip_parse(data) -> list[ZipEntry]— in-memoryzip_write(path, entries, compress)/zip_read(path) -> list[ZipEntry]— on diskzip_names(entries) -> list[str],zip_has(entries, name) -> bool,zip_extract(entries, name) -> bytes
With compress=True each entry is deflated and kept only if smaller than
the raw data (CPython zipfile behaves the same way). Written archives use a
fixed DOS timestamp (1980-01-01) so output is deterministic.
Limits
No zip64 (4 GiB / 65535-entry caps), no encryption, no multi-disk archives,
no on-the-fly streaming. Archives produced here open fine in CPython's
zipfile and vice versa; exact archive bytes differ between worlds because
the DEFLATE encoders differ.
Metadata
Release files for serp-zipfile 0.2.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 | Actions |
|---|---|---|---|---|
| serp_zipfile-0.2.0.tar.gz | 5.4 kB | With provenance | Details for serp_zipfile-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| serp_zipfile-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for serp_zipfile-0.2.0-py3-none-any.whl |
Total release size: 9.9 kB
Release files / serp_zipfile-0.2.0.tar.gz
| Download URL | serp_zipfile-0.2.0.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a128498912106590f023807fc227369bb2003edd1dd6091aa26ce2a7577a26bd
|
|
BLAKE2b-256 checksum How to use checksums |
3f34219f2514d3c00e7724c17479b076e9dde41bb4d19b155305c00d6118c692
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.
Transparency logRelease files / serp_zipfile-0.2.0-py3-none-any.whl
| Download URL | serp_zipfile-0.2.0-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b6c05de4ba635e0bb2b4260dc2a82c5c045d196a1ae531a4207025b65b2ee1f9
|
|
BLAKE2b-256 checksum How to use checksums |
a7648d789755c317590086aac94760525795d3f8b00cf1582631d65f3f8a1b36
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.
Transparency logSecurity for serp-zipfile 0.2.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for serp_zipfile-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.
Transparency logA 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.