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

Uploaded CPython 3.8+ Windows x86-64

lancedb-0.10.2-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.2-cp38-abi3-manylinux_2_24_aarch64.whl (20.4 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.24+ ARM64

lancedb-0.10.2-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.2-cp38-abi3-macosx_11_0_arm64.whl (17.0 MB view details)

Uploaded CPython 3.8+ macOS 11.0+ ARM64

lancedb-0.10.2-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.2-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: lancedb-0.10.2-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.2-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 40c8ec4e407624ab2ea636d54cb0d5a72ec35dfd9421fb1b45bd10827c2c474d
MD5 24c923c808bf6ccff6c51dc030cc763b
BLAKE2b-256 4b12dc71870c2dfb220b24ba8d328a4574c665427352461955481ed78231bdab

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.10.2-cp38-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6aa7427d74c5ce8f5e44a4f6b736f201fabc15f4251a89fa65ee94a00c7124e7
MD5 39f8142e1526c30306db84b51cda6829
BLAKE2b-256 ba6c301812cc12ec1239c8fd6114af26e3026fe5126816ecc355fcec924fd6ba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.10.2-cp38-abi3-manylinux_2_24_aarch64.whl
Algorithm Hash digest
SHA256 ef5d384cc9ca200e659a676cf4932d447056c1a92133aec4af27ddab833f68cc
MD5 18892e351dc65f1381f42fd91620958c
BLAKE2b-256 0a9d54878b85c04a2e60df77e0f32f3ce84d82e9838a879c487d375df762e0b9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.10.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fcb8efd9d8341870915e8495cf383cb4bf2b69dc41ba8921a271bad8b3225d25
MD5 c09e0a2e1329b82f2ea9a77590b86b1b
BLAKE2b-256 adc34b99b0acb0206589d1ef30a88550734ab935b813867ecf8b44042e9f6651

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.10.2-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c808755e217e4a6520bdebe05297b8a7aada231497b8304132610a60fb72ddc9
MD5 b8138f1168e17e4cf74bf03099a12643
BLAKE2b-256 5c56742769088a174ad3b701aec5fe966111605d39539a11d8c319f1e0ac4a9c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.10.2-cp38-abi3-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 ae148b4cba151ec464c607447c3afeab0b0d55d8ebf72cf1dd6f58fa00278771
MD5 65fd2ca1487f5328faee4347f6337fe2
BLAKE2b-256 d39d51c7d6c2094d4a255722e2a227f286994620c00b64eb05dd903a53cbd133

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