Skip to main content

Python bindings to libcozip, the reference library for the Cloud-Optimized ZIP (cozip) format.

Project description

cozip

Python bindings for libcozip. Read a Cloud-Optimized ZIP archive's manifest over HTTP range requests, or write one from a pyarrow Table.

The native libcozip binary ships inside the wheel, no C toolchain required.

Install

pip install cozip

Usage

Write

import cozip
import pyarrow as pa

table = pa.table({
    "name": ["a.txt", "b.bin"],
    "path": ["/path/to/a.txt", "/path/to/b.bin"],
})

cozip.write("out.zip", table)

name is how each file appears inside the archive. path is where it lives on disk, used at write time and dropped from the manifest. Any extra columns ride along into __metadata__ and become queryable on read.

table = pa.table({
    "name":      ["a.tif", "b.tif"],
    "path":      ["/path/to/a.tif", "/path/to/b.tif"],
    "cloud_pct": [12.3, 45.1],
})

cozip.write("out.zip", table)

Read

import cozip

manifest = cozip.read("https://example.com/dataset.zip")
train = manifest[manifest["split"] == "train"]

manifest is a pandas DataFrame with name, offset, size, cozip:gdal_vsi, plus whatever extras the writer added. Local file or remote URL, same call. Only the byte-0 index and the embedded __metadata__ Parquet are fetched, never the user payloads. Pass columns=[...] to bring only specific extras, gdal_vsi=False to drop the VSI path column.

Versioning

The Python package version tracks the C library, copied verbatim from the repo-root VERSION file at build time. The bundled .so / .dylib / .dll inside the wheel matches the wheel's version exactly, so there's no mismatch to worry about.

import cozip
cozip.__version__                  # "2026.5.16"
cozip.lib.cozip_version_string()   # full C library version

Spec

See SPEC.md for the on-disk format.

License

MIT. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cozip-2026.5.17.tar.gz (12.7 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

cozip-2026.5.17-py3-none-win_amd64.whl (94.5 kB view details)

Uploaded Python 3Windows x86-64

cozip-2026.5.17-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (119.7 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

cozip-2026.5.17-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (120.2 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

cozip-2026.5.17-py3-none-macosx_11_0_universal2.whl (179.1 kB view details)

Uploaded Python 3macOS 11.0+ universal2 (ARM64, x86-64)

File details

Details for the file cozip-2026.5.17.tar.gz.

File metadata

  • Download URL: cozip-2026.5.17.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cozip-2026.5.17.tar.gz
Algorithm Hash digest
SHA256 d1fa5ac6403455328f05029a2180084b77dc80e9da7b3461cc49079e63e4b127
MD5 07b6018690ad842ec95dcfeca81917a4
BLAKE2b-256 1840dd55cea94fa729c2328fe789525bd4fa4bdc6c07eab34ab447305136e2dc

See more details on using hashes here.

Provenance

The following attestation bundles were made for cozip-2026.5.17.tar.gz:

Publisher: release.yml on asterisk-labs/cozip

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cozip-2026.5.17-py3-none-win_amd64.whl.

File metadata

  • Download URL: cozip-2026.5.17-py3-none-win_amd64.whl
  • Upload date:
  • Size: 94.5 kB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cozip-2026.5.17-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 2edc8a7e149deb83799189105e9b266f7347d948f6c1df8d3ee3a8e059d7186b
MD5 b34e6022c38491491a36e56e40b5a7f4
BLAKE2b-256 66b16661334d105f161125b8e0ba21b26fbd3454f7e1034d2c1ac0cd7783c4e0

See more details on using hashes here.

Provenance

The following attestation bundles were made for cozip-2026.5.17-py3-none-win_amd64.whl:

Publisher: release.yml on asterisk-labs/cozip

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cozip-2026.5.17-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cozip-2026.5.17-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9fddd7a97f40b8fe887d400ef820a0d1d6e5f5c093d61459fe7cc2608343fbca
MD5 638efa04d3ddb9d4313755ff56f4d9ae
BLAKE2b-256 e4a379e3f35571d9b6dba61565ee23393da105dfa1935a60ccd7babea48a1e48

See more details on using hashes here.

Provenance

The following attestation bundles were made for cozip-2026.5.17-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on asterisk-labs/cozip

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cozip-2026.5.17-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for cozip-2026.5.17-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 346de1d9506e29260e273b6931d4277efcd38c0a3c4707318212ec4b5d82200b
MD5 c7b01e2e995c5a47498af81910224454
BLAKE2b-256 60c74df576c42d69775cf232e5c1ce6f17df37c603b1f0dde3a2fb1f32cbd641

See more details on using hashes here.

Provenance

The following attestation bundles were made for cozip-2026.5.17-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl:

Publisher: release.yml on asterisk-labs/cozip

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cozip-2026.5.17-py3-none-macosx_11_0_universal2.whl.

File metadata

File hashes

Hashes for cozip-2026.5.17-py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 439c8b34e092730425767c03b3cc38bffdfb0e3925fa902e5a34e3cbd81229a3
MD5 f2e4418a6cbb30a76e0d40e71508af41
BLAKE2b-256 cbfb3f625c48e4507fe7cb1f98a1f4f5ac9748295d30106f8e9acd1a03207d9a

See more details on using hashes here.

Provenance

The following attestation bundles were made for cozip-2026.5.17-py3-none-macosx_11_0_universal2.whl:

Publisher: release.yml on asterisk-labs/cozip

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page