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.15.0-cp38-abi3-win_amd64.whl (24.8 MB view details)

Uploaded CPython 3.8+ Windows x86-64

lancedb-0.15.0-cp38-abi3-manylinux_2_28_x86_64.whl (27.1 MB view details)

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

lancedb-0.15.0-cp38-abi3-manylinux_2_24_aarch64.whl (25.7 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.24+ ARM64

lancedb-0.15.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (27.7 MB view details)

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

lancedb-0.15.0-cp38-abi3-macosx_11_0_arm64.whl (22.4 MB view details)

Uploaded CPython 3.8+ macOS 11.0+ ARM64

lancedb-0.15.0-cp38-abi3-macosx_10_15_x86_64.whl (23.9 MB view details)

Uploaded CPython 3.8+ macOS 10.15+ x86-64

File details

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

File metadata

  • Download URL: lancedb-0.15.0-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 24.8 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.15.0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 66d251f22709c72f819aace9e665127f1040845d88b25c1f088c4beb36087f7e
MD5 8647d851b2436fda517b806601dcbb11
BLAKE2b-256 70ccbeb57ff12a5f8f37f8d469fa2399ac76b2909c76f38e3d61cd07f51c288d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.15.0-cp38-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 223cd77fa84a1317301ad4771de58ac5685d58cee03f0a20ba4bc95517b5c79f
MD5 58f30607323c89159930a07ad7f9c244
BLAKE2b-256 e3a867a8dc6fd7a57bde6b9f75b10368805db46b109adc7d634d7ce45bc655f3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.15.0-cp38-abi3-manylinux_2_24_aarch64.whl
Algorithm Hash digest
SHA256 c567866b08222457e1aca51df9abeb871aad8fed0db58c004365629c05f8ecbb
MD5 72a9ddf13f81772da40371cbb9063976
BLAKE2b-256 768dfb7148ab42227aff5fc72d5f278dadf1c71bda923a44896aa8c9e2e79b48

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.15.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e349a1671943b75a536d2589b5a12f685c129149b0cad266e12555f9501f8ccd
MD5 0a4103da5004c0f33f10c30c860846c3
BLAKE2b-256 85ae588f4587f2096e1de27d255c0e5557326e71c8e26bc19e516bb8f592785d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.15.0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 48c28571f79805e11a3bca09486fd1c8d6c3f7762f7692cca1c5e0cdea6bfa20
MD5 0d186a892176e914a1d7b8f454dba260
BLAKE2b-256 95cc8333fd74e82a4a088b522e76dc68f225054b3527d885e01c8ef1806dab3f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.15.0-cp38-abi3-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 3eacc9c6766594874a7d54e822550c7991d64b14571251f1e4b43985cc4f3cdb
MD5 739712d53ad6d4ba90c070f6f795ba3f
BLAKE2b-256 6fb3c0da4a07137781b35f70d8630baf656a30e5b05be6cbe5dacfe686c69229

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