Pylance is the Python SDK for the Lance columnar data format, an open lakehouse format optimized for AI/ML workflows. It offers high-performance vector search, efficient random access, and built-in data versioning and lineage. The library leverages Apache Arrow for data interchange and its core bindings are implemented in Rust via PyO3 for performance. It seamlessly integrates with popular data science tools like Pandas, DuckDB, Polars, PyArrow, and Ray. The current version is 4.0.0, released on March 30, 2026, and the project has a regular release cadence with stable releases approximately every two weeks, although its development status is currently marked as 'Alpha'.
pip install pylanceVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to create a Lance dataset from a Pandas DataFrame, write it to disk, and then read it back. It also includes cleanup of the created files.
Be prepared for potential API changes and refer to the official documentation for the latest usage patterns.
Familiarize yourself with cloud storage configurations and performance considerations when working with Lance datasets.
Ensure `duckdb` is updated to version 0.7+ if you plan to use it with Lance.
Use `pip install pylance` for stable releases in production. For preview features, be prepared to update regularly or adjust dependencies.
Install the 'pylance' package using pip: `pip install pylance`. If using a virtual environment, ensure it is activated and the correct interpreter is selected in your IDE.
Consult the official 'pylance' documentation for the correct method names and required parameters for vector search operations. Ensure your dataset has the necessary vector column and that any required indexes have been built. For example, a correct call might involve `dataset.search().vector(...)`.
Convert the input data to one of the supported types before passing it to the 'pylance' function. For instance, if you have a list of dictionaries, convert it to a Pandas DataFrame or PyArrow Table first. Example: `df = pd.DataFrame(my_list_of_dicts)` followed by `lance.write(df, "path/to/dataset")`.