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

Uploaded CPython 3.8+ Windows x86-64

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

Uploaded CPython 3.8+ manylinux: glibc 2.24+ ARM64

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

Uploaded CPython 3.8+ macOS 11.0+ ARM64

lancedb-0.10.1-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.1-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: lancedb-0.10.1-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.1-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 a2ffb1dde118ec64df155a8344093fdb6596c58639d562bddbb2dfb359db7afa
MD5 15dda548bfbdce3a8e9b5200b7a77be1
BLAKE2b-256 2bfb1012e4a94db8e1ee6243ae2ff44a539bd4de33aef9b4e62f02626b9d5688

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.10.1-cp38-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ff5fc893464d3039c0acaaa6420ae6d8a6409d218eac6c1f71622f1056c398c3
MD5 17a80c0d3236055bcf4859134f303309
BLAKE2b-256 bd9ad58a5c5490c087ba1ef6b146f7cea9a709f081b5e0c0bacf491358befab0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.10.1-cp38-abi3-manylinux_2_24_aarch64.whl
Algorithm Hash digest
SHA256 37b6879ed18d50fdd21741a8b6b215a62bfa8e2ca6d84d3d5489085071bec43d
MD5 a111f83e5948a7b33ab518f0ab5eb3fe
BLAKE2b-256 28e07815718625342b027b950fb1670e47af7027fd73a04ed1febe0052086bde

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.10.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f82f96e6e32670a1b9d8cebfbce973ca6a66c66a9aec7a80beff99ad09d3f5d9
MD5 100c13580d3894db85e91bd5c410c4bd
BLAKE2b-256 fd6aec3d59f1a466f0fa9400a13aff514e64e232d21129064eae3977f61e7768

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.10.1-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6da31c08d9fdec954faa736fa4feb5ad69515acd6c4283dc78d3edb154bbd82b
MD5 5b69083005ab628e4fbc2e74b1d080d7
BLAKE2b-256 18c83f71217973d2eeb64772911fce2bfc597cdd36f728e8e1f533e8bf7523f4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.10.1-cp38-abi3-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 dc38d85b2018c15924e5d3ccc5c73fb9cfe259ad7f24ad575a969735caf48a8c
MD5 63f3b7a1ece545b3fcb36aa118198d68
BLAKE2b-256 f60b60e8954ec2734f8cf6aa716565469f74d23c87126290f51d4a7a7af41f2b

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