Skip to main content

Python Guide

SigilYX provides first-class Python bindings for reading and writing YXDB files. The Rust core does the heavy lifting - your Python code gets native performance with zero-copy data transfer.

Supported Output Formats​

FormatFunctionBest for
Polars (default)read_yxdb()Fastest path, modern DataFrame API
PyArrowread_yxdb_arrow()Interop with Arrow ecosystem
Pandasread_yxdb_pandas()Legacy codebases, broad library support

All three formats use the same Rust reader under the hood. Polars is the fastest because data transfers via the Arrow C Data Interface with zero copies. PyArrow and Pandas add a conversion step but are still orders of magnitude faster than pure-Python alternatives.

Installation​

See the Installation page for full details, including optional extras and building from source.

pip install sigilyx

Two Ways to Use It​

Just importing sigilyx registers official Polars namespace plugins:

import polars as pl
import sigilyx # That's all it takes

df = pl.read_yxdb("data.yxdb")
df.yxdb.write("output.yxdb")

2. Direct API​

import sigilyx as yx

df = yx.read_yxdb("data.yxdb") # Polars DataFrame
yx.write_yxdb("output.yxdb", df)

Both approaches use the same Rust reader. The Polars plugin API is syntactically nicer if you're already in a Polars workflow.

Next Steps​

  • Installation - Requirements and optional extras
  • Polars - Full Polars integration guide
  • Pandas - Working with Pandas DataFrames
  • PyArrow - Arrow Tables and interop
  • Streaming - Batched reads for large files
  • Lazy Scan - Deferred execution with LazyFrames
  • Writing - All write paths including streaming batch writes
  • Metadata - Inspect file structure without reading data
  • Spatial & GeoArrow - Geospatial data, GeoArrow, and GeoPandas
  • Row Reader - Row-by-row iteration
  • API Reference - Complete signature reference for every public class and function