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
matruin 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

This version

0.6.6

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

Uploaded CPython 3.8+ Windows x86-64

lancedb-0.6.6-cp38-abi3-manylinux_2_24_aarch64.whl (20.0 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.24+ ARM64

lancedb-0.6.6-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (22.4 MB view details)

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

lancedb-0.6.6-cp38-abi3-macosx_11_0_arm64.whl (17.7 MB view details)

Uploaded CPython 3.8+ macOS 11.0+ ARM64

lancedb-0.6.6-cp38-abi3-macosx_10_15_x86_64.whl (19.4 MB view details)

Uploaded CPython 3.8+ macOS 10.15+ x86-64

File details

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

File metadata

  • Download URL: lancedb-0.6.6-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 21.3 MB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.8.10

File hashes

Hashes for lancedb-0.6.6-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 923d24730ede4e5d3d84bdb13b62e8d0a345ba864158f69a2f321b8e970c6c38
MD5 1c91d62ac507832ebdac15d41410c784
BLAKE2b-256 8fe65b878d218f7ba8dfcd43df5796b20116357efee4623a1cb52a4c42483fea

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.6.6-cp38-abi3-manylinux_2_24_aarch64.whl
Algorithm Hash digest
SHA256 05fd70a1a0a260bcdd55e866801a64f3a39269b58fd47d2f66f4ff7005142c7e
MD5 2701ff3c5bab23708c4408d7cbeca291
BLAKE2b-256 db4d5ee047e2cc5a25b061ca21d31ca438af4e21b159f88a0bd060e276d9ac9e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.6.6-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 da170cc97071a869a7cf03ef2382fc7226974972e88a893c0a777b147b7ceb4c
MD5 7a582ca349548b80053896bf57c18c3f
BLAKE2b-256 ffd1a18c7928a7ffc3da24df1f81da664e59ef692d0f0a907a161ff0ff150b2c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.6.6-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 68e239d8a2f559b4eba75989fe2cec80eacc070639cab3d7a45fe5b687fb3689
MD5 aa463aec2f454b7d01297fe69e059a5f
BLAKE2b-256 59b867319cd16ebe828b339dd959fb2559e15bcde3868b10d0a0c5a5a31b1cc8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.6.6-cp38-abi3-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 d0791e233fa1460b5ab0464243833735dfb73b46ae4fc1f2a40d3fcd6990e7e7
MD5 2e17a0380b7d4021cd45681637779374
BLAKE2b-256 6bc79642ef8d8caf88ecfe322345358e6ffbe306eb47c4bd07162b357ecee415

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