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.14.1b1-cp38-abi3-win_amd64.whl (25.0 MB view details)

Uploaded CPython 3.8+ Windows x86-64

lancedb-0.14.1b1-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.14.1b1-cp38-abi3-manylinux_2_24_aarch64.whl (26.1 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.24+ ARM64

lancedb-0.14.1b1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (27.6 MB view details)

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

lancedb-0.14.1b1-cp38-abi3-macosx_11_0_arm64.whl (22.3 MB view details)

Uploaded CPython 3.8+ macOS 11.0+ ARM64

lancedb-0.14.1b1-cp38-abi3-macosx_10_15_x86_64.whl (24.2 MB view details)

Uploaded CPython 3.8+ macOS 10.15+ x86-64

File details

Details for the file lancedb-0.14.1b1-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: lancedb-0.14.1b1-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 25.0 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.14.1b1-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 c1371fdecd16d921ca80d887b90bed64c175dfa756f8b46c8dd4be0a1273f0da
MD5 3c6a01d930ee7b0a85c01a6e5e56c7c4
BLAKE2b-256 ccf9115eecb7b3bea167eb0af77b218972726b0187665dcaf8a6ca1bad682917

See more details on using hashes here.

File details

Details for the file lancedb-0.14.1b1-cp38-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for lancedb-0.14.1b1-cp38-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b6977b7d144272570980edac010fb1fdfa0305c069f8206198fcd979d3081e75
MD5 2514244d0289858017f5690621822b75
BLAKE2b-256 376ac1c6222fb42733d099723598e1fcb0eeda248b60e6a0a4769d61a79c2dd5

See more details on using hashes here.

File details

Details for the file lancedb-0.14.1b1-cp38-abi3-manylinux_2_24_aarch64.whl.

File metadata

File hashes

Hashes for lancedb-0.14.1b1-cp38-abi3-manylinux_2_24_aarch64.whl
Algorithm Hash digest
SHA256 6e35fb8cd978b5e88ec074c2a26a87d9695131521416c487fa857da134996b6c
MD5 966d209da08541d4e43ba7b344da8f18
BLAKE2b-256 bea3d2618255922e228cae28e6674bb671195a4c8410a100724ceba71d239e30

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.14.1b1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 29443622da9083566c97bd1fb550cbbea42fc05caf413000183e4edca32e7aa1
MD5 f7236ced1ce4e40d197d1a3198fbd9f3
BLAKE2b-256 565564cd61db133526e7706dd070cd6be0f4e08bf1882cb32c06822c34271610

See more details on using hashes here.

File details

Details for the file lancedb-0.14.1b1-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for lancedb-0.14.1b1-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 04d6d7b0fa5c0350df23e3d7e17abaf986f28a3bf0a2c332fb0e7a3a30cc262e
MD5 18e780eaab3b8db4661f64568685f1a6
BLAKE2b-256 8f2676f4e3a1f1be38468a5ed750d9172d56d405a83979049e290d18769162fb

See more details on using hashes here.

File details

Details for the file lancedb-0.14.1b1-cp38-abi3-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for lancedb-0.14.1b1-cp38-abi3-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 05ffab5c2c11e9763a07fec61b6c0bd6190e67a0e43a44c73ccaad77954c23f2
MD5 8f13a5e78a6f1d0f70da7f243142d1be
BLAKE2b-256 b8cc367bcdc2015420b5762293b6be41f47f953b068354950e26c92f4710be75

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