Metadata-Version: 2.4
Name: polars-lance
Version: 0.2.0
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Rust
Requires-Dist: polars>=1.0.0
License-File: LICENSE
Summary: Polars plugin for reading Lance datasets into Polars dataframes.
Keywords: polars,lance,arrow
Author: Jorrit Sandbrink
License-Expression: MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Repository, https://github.com/jorritsandbrink/polars-lance

# polars-lance

Polars plugin for reading Lance datasets into Polars dataframes.

## Installation

```bash
pip install polars-lance
```

## Usage

```python
from polars_lance import scan_lance

lf = scan_lance("data/example.lance")
df = lf.collect()
```

## Cloud storage

Pass `storage_options` to access Lance datasets stored in AWS S3, Azure Blob Storage, or Google Cloud Storage.

```python
from polars_lance import scan_lance

lf = scan_lance(
    "s3://my-bucket/example.lance",
    storage_options={
        "aws_access_key_id": "AKIAIOSFODNN7EXAMPLE",
        "aws_secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
        "aws_region": "us-east-1",
    },
)
df = lf.collect()
```

Cloud storage IO is powered by the `object_store` Rust crate. These are the supported schemes and options:
- `s3://`: [AWS options](https://docs.rs/object_store/latest/object_store/aws/enum.AmazonS3ConfigKey.html)
- `az://`: [Azure options](https://docs.rs/object_store/latest/object_store/azure/enum.AzureConfigKey.html)
- `gs://`: [GCP options](https://docs.rs/object_store/latest/object_store/gcp/enum.GoogleConfigKey.html)

