Skip to main content

lancedb

Project description

LanceDB

A Python library for LanceDB.

Installation

pip install lancedb

Usage

Basic Example

import lancedb
db = lancedb.connect('<PATH_TO_LANCEDB_DATASET>')
table = db.open_table('my_table')
results = table.search([0.1, 0.3]).limit(20).to_list()
print(results)

Development

LanceDb is based on the rust crate lancedb and is built with maturin. In order to build with maturin you will either need a conda environment or a virtual environment (venv).

python -m venv venv
. ./venv/bin/activate

Install the necessary packages:

python -m pip install .[tests,dev]

To build the python package you can use maturin:

# This will build the rust bindings and place them in the appropriate place
# in your venv or conda environment
matruin develop

To run the unit tests:

pytest

To run the doc tests:

pytest --doctest-modules python/lancedb

To run linter and automatically fix all errors:

ruff format python
ruff --fix python

If any packages are missing, install them with:

pip install <PACKAGE_NAME>

For Windows users, there may be errors when installing packages, so these commands may be helpful:

Activate the virtual environment:

. .\venv\Scripts\activate

You may need to run the installs separately:

pip install -e .[tests]
pip install -e .[dev]

tantivy requires rust to be installed, so install it with conda, as it doesn't support windows installation:

pip install wheel
pip install cargo
conda install rust
pip install tantivy

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

lancedb-0.6.1-cp38-abi3-win_amd64.whl (20.2 MB view details)

Uploaded CPython 3.8+ Windows x86-64

lancedb-0.6.1-cp38-abi3-manylinux_2_24_aarch64.whl (19.1 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.24+ ARM64

lancedb-0.6.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (21.3 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.17+ x86-64

lancedb-0.6.1-cp38-abi3-macosx_11_0_arm64.whl (16.7 MB view details)

Uploaded CPython 3.8+ macOS 11.0+ ARM64

lancedb-0.6.1-cp38-abi3-macosx_10_15_x86_64.whl (18.2 MB view details)

Uploaded CPython 3.8+ macOS 10.15+ x86-64

File details

Details for the file lancedb-0.6.1-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: lancedb-0.6.1-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 20.2 MB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.8.10

File hashes

Hashes for lancedb-0.6.1-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 bb3556d2a8409dacba2b719c43a1fa09f8c43db675357ede1cfaece929df8811
MD5 2c64735b2b5dab1c004cda9393558a61
BLAKE2b-256 2274efe74c11a6d7b66b933d0201da6a078b2ba7db24ad4b65b25a9ecfd7978a

See more details on using hashes here.

File details

Details for the file lancedb-0.6.1-cp38-abi3-manylinux_2_24_aarch64.whl.

File metadata

File hashes

Hashes for lancedb-0.6.1-cp38-abi3-manylinux_2_24_aarch64.whl
Algorithm Hash digest
SHA256 9d12ae8951b6f1842ead84149131445d58a99e506ca1f1396705d3ce712cd6f0
MD5 1f3f153596545c370ce9bb10756ded7a
BLAKE2b-256 0bc29848b75a981d5045601675c7cbf9d73688c951699a372a72a9ea745fe2ac

See more details on using hashes here.

File details

Details for the file lancedb-0.6.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lancedb-0.6.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 58956013da91f4d9e553a23e1b990adbe3a0a7077fc30269976cf5fa6ea99564
MD5 afaa4354481422874390d3834beff660
BLAKE2b-256 5a7541f910c277e4ac44f3e4e6c2e5b5d677acf195333d371cc69ff4324cd81c

See more details on using hashes here.

File details

Details for the file lancedb-0.6.1-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for lancedb-0.6.1-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 853a3fb183cec40c16d157afba741513b56c3a663dd089265fa4c662e245a21b
MD5 ef8461c544977708abbb9dde10210d17
BLAKE2b-256 517bdb9b5a5ad1bdd95e87770181ba920a7b295e48db06b151a0b2939ca228d0

See more details on using hashes here.

File details

Details for the file lancedb-0.6.1-cp38-abi3-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for lancedb-0.6.1-cp38-abi3-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 4842593b395a07405213388c6791a77f60181371e21f7bb8944f823f82488d7d
MD5 26ff4a4b77752ac6851dac72c5100409
BLAKE2b-256 fadc9ea346a0a03381363d696ac947e9a81d91265e46c8c931b069366c2926c1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page