Skip to main content

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

Project description

cozip — Cloud Optimized ZIP

License MIT PyPI R Julia npm WASM DuckDB C11


What is cozip?

A ZIP file you can open like a table — over the network, without downloading it.

cozip puts a Parquet manifest called __metadata__ at byte 0 — one row per entry with name, offset, size, plus any columns you add (split, label, class...). DuckDB, Arrow, and Polars query it directly. Range requests fetch only the bytes you actually need.

A 20 GB archive becomes a queryable table.

It's still a ZIP. unzip, zipfile.ZipFile, your OS's preview window — all unchanged.

Install

pip install cozip

Usage

Two functions: write and read.

Write

import cozip
import polars as pl

df = pl.DataFrame({
    "path":  ["local/tile_001.tif", "local/tile_002.tif", "local/tile_003.tif"],
    "name":  ["tile_001.tif", "tile_002.tif", "tile_003.tif"],
    "split": ["train", "val", "train"],
    "label": ["cloud", "water", "forest"],
})

cozip.write("dataset.zip", df)

Two reserved columns. path is where the file lives on disk — it's consumed at write time and dropped. name is how the entry is stored inside the archive and becomes part of __metadata__. Every other column rides along and becomes queryable on read.

Read

df = cozip.read("dataset.zip")

Local file or remote URL — same call. You get a DataFrame back with one row per entry, including offset and size resolved against the archive.

df = cozip.read("https://example.com/dataset.zip")

# query the manifest like any DataFrame
batch = df.filter(pl.col("split") == "train").sample(32)

# batch.select(["name", "offset", "size"]) is everything you need
# to range-request the payloads

Bindings

Language Install
Python pip install cozip
R install.packages("cozip", repos = "https://asterisk-labs.r-universe.dev")
Julia Pkg.add("Cozip")
JavaScript npm install cozip
WASM browser bundle, no Node required
DuckDB INSTALL cozip FROM community; LOAD cozip;
C vendored single-header cozip.h

All bindings call into the same C11 core. Byte-exact behavior across runtimes.

Specification

The on-disk format is defined in SPEC.md. Any conforming implementation reads any cozip ever written.

License

MIT


Developed with ❤️ by

Asterisk Labs

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.13.tar.gz (15.3 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.13-py3-none-win_amd64.whl (98.1 kB view details)

Uploaded Python 3Windows x86-64

cozip-2026.5.13-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (123.3 kB view details)

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

cozip-2026.5.13-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (123.8 kB view details)

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

cozip-2026.5.13-py3-none-macosx_11_0_universal2.whl (182.6 kB view details)

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

File details

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

File metadata

  • Download URL: cozip-2026.5.13.tar.gz
  • Upload date:
  • Size: 15.3 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.13.tar.gz
Algorithm Hash digest
SHA256 2f5bd91a821c41bdd8975031ddb0dbc1187e0298d13d45a8ce92bae214bfbeb6
MD5 e6d934403425d84c17a7f1c7c164659d
BLAKE2b-256 814a949e4842277d72455372d58925d8542fd709f3eb4e4f86a8398ffccb92d8

See more details on using hashes here.

Provenance

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

Publisher: release.yml on asterisk-labs/taco

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.13-py3-none-win_amd64.whl.

File metadata

  • Download URL: cozip-2026.5.13-py3-none-win_amd64.whl
  • Upload date:
  • Size: 98.1 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.13-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 7c78bd0be7f1c377f4bc9d250dbfbf7146be440a5c67e55321071cd34073cb02
MD5 7977b242abd9c68fded04eb44000f81b
BLAKE2b-256 500065b318ac946b9b1de113f3485e79e39af67ac1cc619be372ed5e0e055e54

See more details on using hashes here.

Provenance

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

Publisher: release.yml on asterisk-labs/taco

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.13-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.13-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1d5e834fa49c7acf613400fb221d50cdcc97b5a292d7cf706f6120abd6eaf677
MD5 3dd390f4dc149009463e920ea044ac0f
BLAKE2b-256 d6940de07fa8e062e77384cdcebb23c8f2e76890646ff3cc6c2674d12567165c

See more details on using hashes here.

Provenance

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

Publisher: release.yml on asterisk-labs/taco

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.13-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for cozip-2026.5.13-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 0a777d9c01e698729cb0382c5ff70f0b7115297223d2927c3a132ba773f4fea4
MD5 509bfd2b1c186d5849d1f2eb567ddc48
BLAKE2b-256 8671e13c2de350745be48ddb002744851b8512c57c7c5494058fc1def1dc67ac

See more details on using hashes here.

Provenance

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

Publisher: release.yml on asterisk-labs/taco

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.13-py3-none-macosx_11_0_universal2.whl.

File metadata

File hashes

Hashes for cozip-2026.5.13-py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 05e72d5e692b95ab5b10d5b9270aad1d183bbb387789df91f92875de5390cc62
MD5 ddc985a2109a3566d302d4d9886712bf
BLAKE2b-256 8dce7fbcb9fb756d1a704455a5c49cda9c469642f8cfd51cc6b030ceb9401f63

See more details on using hashes here.

Provenance

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

Publisher: release.yml on asterisk-labs/taco

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