Registry / data / pylance

pylance

JSON →
library10.0.0pypypi✓ verified 28d ago

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 pylance
INSTALL
IMPORT
SIG · PYLANCE
P
pylance
datapythonv10.0.0
Install
12.4s avg
Import
5323ms
Disk
453MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v12.0.0b4 · 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.10–3.910 runs
build_error
glibc
py 3.10–3.910 runs
installs and imports cleanly · install 12.4s · import 5.323s · 454MB
453MB installed
● package 453MB
Code
Verified usage

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

lance
✓ import lance

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.

import lance import pandas as pd import numpy as np # Create a simple Pandas DataFrame df = pd.DataFrame({ "id": [1, 2, 3], "vector": [[0.1, 0.2], [0.3, 0.4], [0.5, 0.6]], "text": ["apple", "banana", "cherry"] }) # Define a URI for your Lance dataset (local path in this case) lance_uri = "./my_lance_dataset.lance" # Write the DataFrame to Lance format dataset = lance.write_dataset(df, lance_uri, mode="overwrite") print(f"Lance dataset created at: {lance_uri}") # Open the dataset and read it back read_dataset = lance.dataset(lance_uri) read_df = read_dataset.to_pandas() print("\nData read from Lance dataset:") print(read_df) # Clean up the created directory (optional) import shutil shutil.rmtree(lance_uri) print(f"\nCleaned up {lance_uri}")
Debug
Known issues
gotchaThe library is currently in '3 - Alpha' development status, indicating that the API is not yet stable. Breaking changes may occur between minor versions.
fix
Be prepared for potential API changes and refer to the official documentation for the latest usage patterns.
affects: All versions up to 4.0.0
gotchaLance is optimized to be cloud-native, and remote object storage is now the default paradigm. Expect different performance characteristics and potentially require different setup compared to traditional local file-system workflows.
fix
Familiarize yourself with cloud storage configurations and performance considerations when working with Lance datasets.
affects: All versions from 0.3.0 onwards
gotchaWhen integrating with DuckDB, specific functionalities may require DuckDB version 0.7 or newer to avoid potential segfaults or unexpected behavior.
fix
Ensure `duckdb` is updated to version 0.7+ if you plan to use it with Lance.
affects: All versions up to 4.0.0
gotchaWhile preview releases offer the latest features and bug fixes and are tested similarly to stable releases, they are not guaranteed to be available for more than six months. For production environments, it is recommended to pin to stable releases.
fix
Use `pip install pylance` for stable releases in production. For preview features, be prepared to update regularly or adjust dependencies.
affects: All versions, particularly preview releases
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'lance'
The 'pylance' Python SDK, which provides the 'lance' module, has not been installed, or the Python interpreter being used does not have access to the installed package.
fix
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.
AttributeError: 'Dataset' object has no attribute 'vector_search'
This error likely occurs when attempting to call a vector search method (or any method) on a 'lance.Dataset' object with an incorrect name or if the method expects specific parameters or a pre-configured vector index that is not present. In alpha software like 'pylance', API names and required configurations can be subject to change or be less obvious.
fix
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(...)`.
TypeError: argument 'data' must be a pandas.DataFrame, pyarrow.Table or Iterable[pyarrow.RecordBatch], got: <class 'list'>
This type error indicates that data provided to a 'pylance' function (e.g., for writing a dataset) is not in one of the expected formats (Pandas DataFrame, PyArrow Table, or an iterable of PyArrow RecordBatches). The library requires specific input types for efficient data handling.
fix
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")`.
Upgrade
Version history
10.0.0latest on PyPI · released Aug 7, 2026
Audit
Dependencies
pyarrowrequiredLance is built on Apache Arrow for data interchange.
pandasoptionalCommonly used for DataFrame creation and manipulation with Lance datasets.
numpyoptionalOften used for array operations, particularly with vector data.
Agent activity
56 hits · last 30 days
node
48
OpenAI (training)
1
Resources
pylance — pip install pylance · libregistry