Skip to main content

iris

Ship the decoder with the data.

A container carries a reference to a WebAssembly decoder alongside its bytes, and this reads one without linking a format specific reader. Open it and hand it to anything that speaks Arrow.

import iris
import pyarrow as pa

runtime = iris.Runtime()
dataset = runtime.open_path("sample.iris")
table = pa.table(dataset)

pa.table works because a dataset carries __arrow_c_stream__, which is the Arrow PyCapsule interface, so polars, DuckDB and nanoarrow read one the same way. Nothing in the wheel imports pyarrow and the wheel does not depend on it. That is the reason there is no to_pandas and no to_table here: the protocol already exists, every consumer worth handing bytes to speaks it, and a tenth version of it is not an improvement.

The buffers are not copied on the way across. What the consumer takes ownership of is the memory the decoder wrote, and tests/test_iris.py checks that by watching pyarrow's allocator, which does not grow when a table is imported this way.

The whole API

runtime = iris.Runtime()
runtime.set_compilation_cache("/var/cache/iris/decoders")   # off until this is called

dataset = runtime.open_path("sample.iris")
dataset = runtime.open(open("sample.iris", "rb").read())

dataset.name, dataset.num_columns, dataset.column_names
pa.schema(dataset)
pa.table(dataset)
pa.table(dataset.scan([0, 2]))                              # by position in the schema

One runtime per process is the point of the runtime. Every dataset opened from the same one shares its compiled decoders, so the second container to be opened does not compile anything. Making a runtime per file throws that away, and with a compilation cache named it is the difference between tens of milliseconds and a fraction of one. docs/COLD_START.md in the repository has the numbers.

The name

The distribution is irisdb on PyPI and the module is iris, for the same reason the crate is irisdb on crates.io and the command line tool it installs is called iris: the bare name was taken in both places before this project existed.

What it is not

This is a wrapper over the C ABI in iris-c rather than a second implementation. Python and C get the same open, the same projection rule and the same behaviour on a container that reopens for each scan, because there is one implementation of all three and neither binding contains a copy of it.

A container larger than memory is read a range at a time through the windowed path, and that path is Rust only today. From Python, a container is opened whole.

Part of iris. Licensed under Apache-2.0.

Metadata

Release files for irisdb 0.9.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for irisdb 0.9.1
File
irisdb-0.9.1-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details
irisdb-0.9.1-cp39-abi3-manylinux_2_28_x86_64.whl CPython 3.9 abi3 Linux glibc 2.28+ x86-64 Details
irisdb-0.9.1-cp39-abi3-manylinux_2_28_aarch64.whl CPython 3.9 abi3 Linux glibc 2.28+ ARM64 Details
irisdb-0.9.1-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details
irisdb-0.9.1-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details

Total release size: 20.8 MB

Release files / irisdb-0.9.1-cp39-abi3-win_amd64.whl

Download URL irisdb-0.9.1-cp39-abi3-win_amd64.whl
Size 4.4 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
719a1c74dfeff7b5a9ec0243ab0887a8581b230d21d371e8fc2809bc65a6eebd
BLAKE2b-256 checksum
How to use checksums
ca8787fca305540208c431bf22ed48dda5ed019dbe77630240a5c218cf597228
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / irisdb-0.9.1-cp39-abi3-manylinux_2_28_x86_64.whl

Download URL irisdb-0.9.1-cp39-abi3-manylinux_2_28_x86_64.whl
Size 4.6 MB
Tags CPython 3.9 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
cc23c90b2cf0b75f544b0865cd21f35f891732ae62b1d8627e4cafc39af74b74
BLAKE2b-256 checksum
How to use checksums
68aa61d383b8179c19255681c7411b2741821ee3b1ca832b33db2b8c673e1423
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / irisdb-0.9.1-cp39-abi3-manylinux_2_28_aarch64.whl

Download URL irisdb-0.9.1-cp39-abi3-manylinux_2_28_aarch64.whl
Size 3.7 MB
Tags CPython 3.9 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
4d2151ff1d8edc6bfdf818a47dbc5b514f39fecf40cdb67e4cfaf34653a29add
BLAKE2b-256 checksum
How to use checksums
2e456eba7680871377a9c48b9252184641cbfef8ae72feb21ad9a0997d88e538
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / irisdb-0.9.1-cp39-abi3-macosx_11_0_arm64.whl

Download URL irisdb-0.9.1-cp39-abi3-macosx_11_0_arm64.whl
Size 3.6 MB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e28b07b49b50ff198ddae5bb0c3091165b2300ba0aaf8ed29250fa2db1ca668c
BLAKE2b-256 checksum
How to use checksums
4bb96d9eb220a4e79d771080578638e3cc4c46a2530e1f0ccc3795cb8820bcc2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / irisdb-0.9.1-cp39-abi3-macosx_10_12_x86_64.whl

Download URL irisdb-0.9.1-cp39-abi3-macosx_10_12_x86_64.whl
Size 4.4 MB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
8cd3fdd29df8e847d3940b83fefe1f590f5349a23d62c1f44fb0294832bddaa5
BLAKE2b-256 checksum
How to use checksums
a5e3fecbfa93d5aa12242ca5c28411954163f32be2a54ad69e156ffe5f168175
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

0.9.1 This release

5 release files

0.8.1

5 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page