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.22.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.22-py3-none-win_amd64.whl (94.4 kB view details)

Uploaded Python 3Windows x86-64

cozip-2026.5.22-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (119.6 kB view details)

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

cozip-2026.5.22-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (120.1 kB view details)

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

cozip-2026.5.22-py3-none-macosx_11_0_universal2.whl (178.9 kB view details)

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

File details

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

File metadata

  • Download URL: cozip-2026.5.22.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.22.tar.gz
Algorithm Hash digest
SHA256 1a103d5842d35f267de2fa7510cc81a98f7c529ac003f0de0fb014d70d7df767
MD5 dcbdc066120ddd5d176f7e59926efc66
BLAKE2b-256 06a9ea6735bc653ff3893337f5639c3931eca7ada26f17d3a926ba50278bddd7

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: cozip-2026.5.22-py3-none-win_amd64.whl
  • Upload date:
  • Size: 94.4 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.22-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 c2d96f98aac43a9b1b2fa4559fc5e8b05c26365759cc329d911da9be41ab106c
MD5 f66bfd4b23f93bcca58551c7919af52b
BLAKE2b-256 0c481d91c483386441b9ab62383df0ad2ab2bca7f6c7d5fbee726cf04521f64c

See more details on using hashes here.

Provenance

The following attestation bundles were made for cozip-2026.5.22-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.22-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.22-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d21facf62646a8e59fc16bb0451ba1d6b9a72b040f86949651e7f0047a8411eb
MD5 24939d960a491c3e1660ac264b755934
BLAKE2b-256 35582083b8861af5210801a43981ece4eac09c8d38dcd653f2ec8db325a60aa5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cozip-2026.5.22-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 1a56bb3ca27e94a985e27a82cd05b4240c825c45359edade7098df286ed65315
MD5 2a22e39869306ec831bb8f2dc3f15d44
BLAKE2b-256 51df9cf647b9330ea7d7f642d980c421939d3e23d673a7426cef9a82007822f1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cozip-2026.5.22-py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 825f4376572f38288d3796e2f3e0d5c6a43d60d2572db0c17f00df39614ebcc0
MD5 2c2a5e1fe2bb885773a8d25e766d0f5c
BLAKE2b-256 e091f6d6fe2bdb363e52c239e6a54bd559203ded4affc88042428f1024d37c95

See more details on using hashes here.

Provenance

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