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

Uploaded CPython 3.8+ Windows x86-64

lancedb-0.16.0b0-cp38-abi3-manylinux_2_28_x86_64.whl (27.3 MB view details)

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

lancedb-0.16.0b0-cp38-abi3-manylinux_2_24_aarch64.whl (25.8 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.24+ ARM64

lancedb-0.16.0b0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (27.8 MB view details)

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

lancedb-0.16.0b0-cp38-abi3-macosx_11_0_arm64.whl (22.5 MB view details)

Uploaded CPython 3.8+ macOS 11.0+ ARM64

lancedb-0.16.0b0-cp38-abi3-macosx_10_15_x86_64.whl (24.0 MB view details)

Uploaded CPython 3.8+ macOS 10.15+ x86-64

File details

Details for the file lancedb-0.16.0b0-cp38-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for lancedb-0.16.0b0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 84d906a2b8496162fca6eedc281a842f04751422486b06a58377bd60c1246cb9
MD5 0e328762ec2969a38e440f6865d07fd6
BLAKE2b-256 f385e48cc1c51720ed2b1556f69ea46e73ec769a335e1eaf31e62408715f3019

See more details on using hashes here.

File details

Details for the file lancedb-0.16.0b0-cp38-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for lancedb-0.16.0b0-cp38-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a362e43ad8e3375058ad955fda10d18110f294e1ed58a3341bb2c0822921fac6
MD5 9f930977dda2afe372429759de0f275e
BLAKE2b-256 01c1ce4240c02e677a6d655fe1251841d242f6b09e005f7df1778394b0eec396

See more details on using hashes here.

File details

Details for the file lancedb-0.16.0b0-cp38-abi3-manylinux_2_24_aarch64.whl.

File metadata

File hashes

Hashes for lancedb-0.16.0b0-cp38-abi3-manylinux_2_24_aarch64.whl
Algorithm Hash digest
SHA256 d61e6d685d5cc1d1502bf6f1f251f5886298e864be6acffb2709cab50cd106a1
MD5 5bb791ce39a29f3875109c802110cb69
BLAKE2b-256 63b8aea97b4e9b5d1692ef9fc5890f1acda7d679280fb543f3e1b59117eaa843

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.16.0b0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6951b446f8240a6cef8b802152a54bb9cac32c650ad46d80dcef3055dd046012
MD5 7c6747d708937ea1d99bc917e0a7fd35
BLAKE2b-256 7193b43eb5f76cd601f43832b193ca829eb746305cc57b703414ece57bd4b33e

See more details on using hashes here.

File details

Details for the file lancedb-0.16.0b0-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for lancedb-0.16.0b0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 18501fea1b5164ac074edd361115d6551f516b119f710b0c433d99afe23b7bb3
MD5 c8aa3550c07e7fe611ebdd4e57398171
BLAKE2b-256 4731189cf8e25bcf8dd2181b719779253a675d37bb6e938ee19f3987ab32a7a0

See more details on using hashes here.

File details

Details for the file lancedb-0.16.0b0-cp38-abi3-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for lancedb-0.16.0b0-cp38-abi3-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 e539e8cf5d86d044c596d7abb953a73531a32fc0e6176bc9151bb9b4243a3468
MD5 c471d8663f1b469ab5fe4a0c005c63eb
BLAKE2b-256 d2fc7f423488c02e17d4d3548bf70b5b09db4503d198211c2b17027a1f5a4f14

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