Registry / data / pyiceberg-core

pyiceberg-core

JSON →
library0.10.1pypypi✓ verified 26d ago

PyIceberg-core is a foundational Python library that provides a Rust-powered core for PyIceberg, enabling efficient access to Apache Iceberg tables without a JVM. It's primarily intended as an internal dependency for the main PyIceberg library but offers performance optimizations for Iceberg data operations. The current version is 0.9.0, and it is actively maintained as part of the broader Apache Iceberg Python project with frequent releases aligning with PyIceberg.

pip install pyiceberg-core
INSTALL
IMPORT
SIG · PYICEBERG-CORE
P
pyiceberg-core
datapythonv0.10.1
Install
6.0s avg
Import
Disk
104MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.8.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
build_error
glibc
py 3.103.910 runs
installs and imports cleanly · install 6.0s · import 0.000s · 57MB
104MB installed
● package 104MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

load_catalog
from pyiceberg_core import load_catalog
from pyiceberg_core import load_catalog

This quickstart demonstrates how to use PyIceberg (which leverages pyiceberg-core) to set up a local SQLite catalog, create a namespace and a table with a defined schema, append data using PyArrow, and then read the data back. It includes necessary cleanup.

import os import shutil import pyarrow as pa from pyiceberg.catalog import load_catalog from pyiceberg.schema import Schema from pyiceberg.types import NestedField, StringType, LongType, IntegerType # Define a temporary warehouse directory WAREHOUSE_PATH = "/tmp/pyiceberg_warehouse" CATALOG_DB_PATH = os.path.join(WAREHOUSE_PATH, "pyiceberg_catalog.db") # Clean up previous run if exists if os.path.exists(WAREHOUSE_PATH): shutil.rmtree(WAREHOUSE_PATH) os.makedirs(WAREHOUSE_PATH, exist_ok=True) # Configure and load a local SQL catalog catalog = load_catalog( "default", type="sql", uri=f"sqlite:///{CATALOG_DB_PATH}", warehouse=f"file://{WAREHOUSE_PATH}" ) # Create a namespace (database) NAMESPACE = "my_namespace" catalog.create_namespace(NAMESPACE, properties={"comment": "My first Iceberg namespace"}) print(f"Created namespace: {NAMESPACE}") # Define a schema for the Iceberg table schema = Schema( NestedField(1, "id", LongType(), required=True), NestedField(2, "name", StringType()), NestedField(3, "age", IntegerType()) ) # Create an Iceberg table TABLE_NAME = "my_table" table = catalog.create_table(f"{NAMESPACE}.{TABLE_NAME}", schema, properties={ "format-version": "2", "write.parquet.compression-codec": "zstd" }) print(f"Created table: {table.name}") # Prepare data with PyArrow data = pa.table({ "id": [1, 2, 3], "name": ["Alice", "Bob", "Charlie"], "age": [30, 24, 35] }) # Append data to the table table.append(data) print("Appended data to the table.") # Read data from the table read_df = table.scan().to_arrow() print("\nData read from Iceberg table:") print(read_df.to_pandas()) # Clean up shutil.rmtree(WAREHOUSE_PATH) print(f"Cleaned up warehouse at {WAREHOUSE_PATH}")
Debug
Known issues
gotcha`pyiceberg-core` is an internal dependency of `pyiceberg`. While it can be installed separately, it is typically managed as an extra by `pyiceberg` (e.g., `pip install "pyiceberg[pyiceberg-core]"`). Directly using `pyiceberg-core` without `pyiceberg` is not the standard pattern and may not expose a full public API.
fix
For general usage, install `pyiceberg` and optionally include `pyiceberg-core` as an extra: `pip install "pyiceberg[pyiceberg-core]"`. `pyiceberg` will then leverage the Rust core for optimized operations.
affects: All versions
gotchaFile I/O with object storage (S3, ADLS, GCS) requires installing specific optional dependencies such as `s3fs`, `adlfs`, `gcsfs`, or `pyarrow` (for local filesystem and some cloud storage via PyArrow's filesystem abstractions). Not installing these will lead to runtime errors when attempting to read/write files.
fix
Install the appropriate filesystem package for your storage solution, e.g., `pip install "pyiceberg[s3fs]"` for S3 or `pip install "pyiceberg[pyarrow]"` for PyArrow-backed I/O.
affects: All versions
deprecatedThe DataFusion integration with PyIceberg (which uses `pyiceberg-core`) is considered experimental and currently has strict version dependencies. For `pyiceberg-core 0.9.0`, it might align with `datafusion == 51`.
fix
If using DataFusion, check the latest PyIceberg documentation for compatible DataFusion versions. The integration is evolving and may have breaking changes or strict version requirements. Avoid using in production without careful testing.
affects: <=0.9.0
gotchaBuilding `pyiceberg-core` can require a Rust toolchain on certain architectures (e.g., non-x86_64 or for specific environments), especially if pre-built wheels are not available.
fix
Ensure your environment has a compatible Rust toolchain installed if you encounter build errors during installation. For most common platforms, pre-built wheels should handle this automatically.
affects: All versions
Upgrade
Version history
0.10.1latest on PyPI · released Aug 1, 2026
Audit
Dependencies
pyicebergrequiredpyiceberg-core is an internal dependency and provides an optimized core for the main pyiceberg library.
pyarrowoptionalCommonly used for data interchange and file I/O operations with Iceberg tables.
s3fsoptionalRequired for S3 object storage interaction.
adlfsoptionalRequired for Azure Data Lake Storage interaction.
gcsfsoptionalRequired for Google Cloud Storage interaction.
datafusionoptionalRequired for experimental DataFusion integration.
Agent activity
13 hits · last 30 days
node
10
Resources
pyiceberg-core — pip install pyiceberg-core · libregistry