Skip to main content

pyivt

pyivt is a library for Statistics Canada Beyond 20/20 .ivt files, written in Rust. It is designed to be minimal and easily adaptable for existing codebases. Key features are:

  • Fast: Orders of magnitude faster than GUI automation for metadata (see local benchmarks/ if you want timings)
  • Python: Easily integrates into modern data workflows with a minimal API
  • Typed: Produces fully type-safe and predictable metadata
  • Interoperable: Exports .ivt file data to Apache Arrow

Installation

uv add pyivt
# or: uv pip install pyivt / pip install pyivt

Requires Python 3.10+ and a platform wheel (abi3) or a local Rust toolchain for source builds.

Development

uv sync --extra dev
uv run python tests/scripts/download.py   # StatCan fixtures for pytest
uv run pytest
# or: uv run maturin develop --release

Usage

Quick Start

Open an IVT file, read its metadata, and write its data to a Parquet file:

import pyarrow.parquet as pq
import pyivt

ivt = pyivt.open("data.ivt")
print(ivt.metadata.title.en)
pq.write_table(ivt.to_arrow(), "data.parquet")

Opening IVT Files

pyivt.open accepts a path, bytes-like buffer, or binary file object. Summary metadata and layout are parsed immediately; cell values decode only when you call to_arrow().

From Path

import pyivt

ivt = pyivt.open("data.ivt")

From URL

import requests

import pyivt

url = "https://example.com/data.ivt"
res = requests.get(url)
res.raise_for_status()

ivt = pyivt.open(res.content)

Reading Metadata

ivt.metadata is a typed IvtMetadata object. Summary fields are eager; heavy fields load on first access.

Beyond 20/20 Summary pyivt Metadata
Title title.en, title.fr
Author author.en, author.fr
Category category.en, category.fr
Keywords keywords.en, keywords.fr
Notes notes.en, notes.fr
Number of Datapoints number_of_datapoints
Time Series time_series (.frequency, .start, .end) or None
Read-Only read_only
Dimensions dimensions
Geographies geographies
Footnotes footnotes
Missing Values missing_values

geographies is a Geographies object (member_id, geo_label, geo_uid, …), not a dict.

import pyivt

ivt = pyivt.open("data.ivt")
print(ivt.metadata.product_id, ivt.metadata.title.en)

Exporting Data

Ivt.to_arrow() returns an Apache Arrow table. Keyword arguments:

Argument Default Meaning
complete True Expand the published grid; set False for sparse decoded cells only
max_cells 100_000_000 Raise if the complete grid would exceed this many cells
labels True Include dimension label columns
language "en" Label language ("en" or "fr")
import polars as pl
import pyarrow.parquet as pq

table = ivt.to_arrow()

# pandas
df = table.to_pandas()

# Parquet
pq.write_table(table, "data.parquet")

# Polars
df = pl.from_arrow(table)

License

pyivt is licensed under the MIT License.

Acknowledgements

Metadata

Release files for pyivt 0.0.1

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

Source distribution (sdist)

Source distribution for pyivt 0.0.1
File Size Uploaded Provenance
pyivt-0.0.1.tar.gz 82.5 kB With provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for pyivt 0.0.1
File
pyivt-0.0.1-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details
pyivt-0.0.1-cp310-abi3-manylinux_2_28_x86_64.whl CPython 3.10 abi3 Linux glibc 2.28+ x86-64 Details
pyivt-0.0.1-cp310-abi3-manylinux_2_28_aarch64.whl CPython 3.10 abi3 Linux glibc 2.28+ ARM64 Details
pyivt-0.0.1-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details
pyivt-0.0.1-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details

Total release size: 6.6 MB

Release files / pyivt-0.0.1.tar.gz

Download URL pyivt-0.0.1.tar.gz
Size 82.5 kB
Tags Source
SHA-256 checksum
How to use checksums
076e9c80c2d4c705835325690def8dfb0378666c378946f84fd05fe31e256f0c
BLAKE2b-256 checksum
How to use checksums
36687b4665f3d5a5d669a51211257008554f9f194db2ff34e9b866d582c9b8fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release files / pyivt-0.0.1-cp310-abi3-win_amd64.whl

Download URL pyivt-0.0.1-cp310-abi3-win_amd64.whl
Size 1.2 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
29e1d6dbf87b45a7c29d7c5bdc098d3968871d7e0b517613bfcbefe974eacebd
BLAKE2b-256 checksum
How to use checksums
be9446bb371753e4b5fbbce894464e861e0a60f9154bbb9182eab56cc82f536d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release files / pyivt-0.0.1-cp310-abi3-manylinux_2_28_x86_64.whl

Download URL pyivt-0.0.1-cp310-abi3-manylinux_2_28_x86_64.whl
Size 1.5 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
2bb9a6a24f6568b5029363a2cd848cec42fe3eccdaaf98bd069f719b0cf633bc
BLAKE2b-256 checksum
How to use checksums
dd6a79f2bc7a2d7a6875a0f51d4ba3ea170a843174020ca42244da47ee7307e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release files / pyivt-0.0.1-cp310-abi3-manylinux_2_28_aarch64.whl

Download URL pyivt-0.0.1-cp310-abi3-manylinux_2_28_aarch64.whl
Size 1.4 MB
Tags CPython 3.10 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
bcfa1818b26803d0dda776db4025ba2c15401cb9e7b2ee2f6cf1d2a86fa7d0a2
BLAKE2b-256 checksum
How to use checksums
3944e0c9b61966ac65c4e39ef299be988065052f8ecd70081404c9469f5bbccb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release files / pyivt-0.0.1-cp310-abi3-macosx_11_0_arm64.whl

Download URL pyivt-0.0.1-cp310-abi3-macosx_11_0_arm64.whl
Size 1.2 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
4df30b873e7f345165274f59a600848a18bd38330d6d1012640bce2b6a31dcc6
BLAKE2b-256 checksum
How to use checksums
7034721d966bc51e1269e42938625d89967c892ede336b2a91475db071e94f9c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release files / pyivt-0.0.1-cp310-abi3-macosx_10_12_x86_64.whl

Download URL pyivt-0.0.1-cp310-abi3-macosx_10_12_x86_64.whl
Size 1.3 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
87c6946dfd7f92b8cec08133dfc9439dac2669fe54968ce2981c327639727f99
BLAKE2b-256 checksum
How to use checksums
e06fd88e469fd9b51fc703e5e7235e6a8b80288e30d84f19bd61f7e1b4b746ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Security for pyivt 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for pyivt-0.0.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

6 release files Full provenance

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