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.20.tar.gz (12.8 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.20-py3-none-win_amd64.whl (94.6 kB view details)

Uploaded Python 3Windows x86-64

cozip-2026.5.20-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (119.8 kB view details)

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

cozip-2026.5.20-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (120.3 kB view details)

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

cozip-2026.5.20-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.20.tar.gz.

File metadata

  • Download URL: cozip-2026.5.20.tar.gz
  • Upload date:
  • Size: 12.8 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.20.tar.gz
Algorithm Hash digest
SHA256 7b959c658eeb13a5f67962049945a54d8a67f1ac1bb27406729f4ee22c0cc2fa
MD5 5ccea45167322e7f59232f3356057acb
BLAKE2b-256 dde1ca9f6de05a6e940ba72c7e243c12bec73f60a3583585d319415ab6144562

See more details on using hashes here.

Provenance

The following attestation bundles were made for cozip-2026.5.20.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.20-py3-none-win_amd64.whl.

File metadata

  • Download URL: cozip-2026.5.20-py3-none-win_amd64.whl
  • Upload date:
  • Size: 94.6 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.20-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 1d74b6e40d42cf3be2a866492afb7e1a68d2133baf8d0949a257709642a3aa2e
MD5 ba910a1955e7971313505b5a12b6bffb
BLAKE2b-256 230ce3d400a4205d8d2d0f78075fb32272c7b7691627a2c995075790b9bd9b5e

See more details on using hashes here.

Provenance

The following attestation bundles were made for cozip-2026.5.20-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.20-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.20-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1a3081fa65a5c206cea69340d913dddfc537c9ca33959df93a3dabda4a791eff
MD5 24c57adc99866ad324aeea3667fc271e
BLAKE2b-256 13b7b86fb587f4b5871676fc15a6a4bda6e9988f41ebcd6254de84726d8476b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for cozip-2026.5.20-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.20-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for cozip-2026.5.20-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 a41f3e9d5b8b1c09bbd35f39bb67e5ee4367ed201a39f342aee61bd7b3c10ec3
MD5 5e80e7ba92008144c95986c0d9b4e9b3
BLAKE2b-256 e28ea1d317fba5c4bf4b287a3e73d90f8760320a0d95292c068de00fdfaf9fcc

See more details on using hashes here.

Provenance

The following attestation bundles were made for cozip-2026.5.20-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.20-py3-none-macosx_11_0_universal2.whl.

File metadata

File hashes

Hashes for cozip-2026.5.20-py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 f122a8d977c1be3816e69dc1a01b929577cb0a95e61e7e3307082900cbe54bc4
MD5 e9bf4741037c59ea2e6ca76f05d9c54a
BLAKE2b-256 efbf539373db08b9ec5f0bc282a2cf10cb2000c28588795bf78daf73cf5c57cb

See more details on using hashes here.

Provenance

The following attestation bundles were made for cozip-2026.5.20-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