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
maturin 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.10.0-cp38-abi3-win_amd64.whl (20.5 MB view details)

Uploaded CPython 3.8+ Windows x86-64

lancedb-0.10.0-cp38-abi3-manylinux_2_28_x86_64.whl (21.0 MB view details)

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

lancedb-0.10.0-cp38-abi3-manylinux_2_24_aarch64.whl (20.4 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.24+ ARM64

lancedb-0.10.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (21.0 MB view details)

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

lancedb-0.10.0-cp38-abi3-macosx_11_0_arm64.whl (17.0 MB view details)

Uploaded CPython 3.8+ macOS 11.0+ ARM64

lancedb-0.10.0-cp38-abi3-macosx_10_15_x86_64.whl (18.6 MB view details)

Uploaded CPython 3.8+ macOS 10.15+ x86-64

File details

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

File metadata

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

File hashes

Hashes for lancedb-0.10.0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 c0f7eec52938ea00ffad80bdeaa7ad398d90e0b47691c86bc9baaa604493e1f0
MD5 1564e66f5bf2eff7d5586c3862380a70
BLAKE2b-256 e6470434187b484de86eb79b7955fe05e07012df62db374ab5b0618dccc65ec8

See more details on using hashes here.

File details

Details for the file lancedb-0.10.0-cp38-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for lancedb-0.10.0-cp38-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 828ff34ed3d81387516e4c8356c5f960ad2c6132a1d5e2cee152f359ec9a40c9
MD5 313463af5a91d947de6313d6cac0c0f0
BLAKE2b-256 818a3ac345af0fc4042aa828b084b1e267058cd10fee28966a45955bae960770

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.10.0-cp38-abi3-manylinux_2_24_aarch64.whl
Algorithm Hash digest
SHA256 e1eb075528f1a9dccb37d490b6bf745ed3afa2decb28c3846490c04bc80dc958
MD5 df817a0961dc427af567136f49d2fffa
BLAKE2b-256 16ae056c66dd81b5fb8ce7b16e647f55245f79d7249734d0185ac36cab1c1169

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.10.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cfa5b19ef009fd96e16417363af52a80fd53b9fa62c322e7020c6a2e154714b7
MD5 1157e863eb95373f89452e8668d7a7e2
BLAKE2b-256 96daa5782e331c5be7438851ce02ccde860125433298faf39cd9470752279010

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.10.0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f390ebe0f145612503f50d6158a7543c7eed8ad9d7a4d560aff1f1c572c3b4ea
MD5 a2093473107af21b745bde8c6b754c95
BLAKE2b-256 5b11c52cd7fe996838e2578fc97a8746893b0b2a04de385b135d09c28bccb343

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.10.0-cp38-abi3-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 e7b922db07d3186867c622af8bbd6fd0306e11fcdec57bdd56d0da303a51a7ad
MD5 4500e5d53a0d2e669a9ac9f9fc21c8ce
BLAKE2b-256 a902187e299dc13bc69e5a1ff3c420739d1510a5e6cf0d98433ce2891c85e09c

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