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

Uploaded CPython 3.8+ Windows x86-64

lancedb-0.14.0-cp38-abi3-manylinux_2_28_x86_64.whl (27.0 MB view details)

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

lancedb-0.14.0-cp38-abi3-manylinux_2_24_aarch64.whl (26.0 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.24+ ARM64

lancedb-0.14.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (27.5 MB view details)

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

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

Uploaded CPython 3.8+ macOS 11.0+ ARM64

lancedb-0.14.0-cp38-abi3-macosx_10_15_x86_64.whl (24.1 MB view details)

Uploaded CPython 3.8+ macOS 10.15+ x86-64

File details

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

File metadata

  • Download URL: lancedb-0.14.0-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 24.9 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.0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 a4e758156554e2a2a493ad569278d8f938e209f38f215924ed1c5f368d1f402e
MD5 c610e22807509351222c51768ae24686
BLAKE2b-256 a9652e4a5cdb897b61497c5da23057f126594a84e6895277429c92db2fb0c287

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.14.0-cp38-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 31fec6c05edf657542d91c396b895b2ba02f0e6114188ea9bb03a3112907a71e
MD5 b09f4e13ab4ce0458e207a4a1a67ed71
BLAKE2b-256 269733e7c5f89711a2c62090fc74590827085638dd2f27dc150f4710542990c1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.14.0-cp38-abi3-manylinux_2_24_aarch64.whl
Algorithm Hash digest
SHA256 777e2d483f13814a2a5624c6824936f400aeab52b961853f1352cc21564f7d6f
MD5 dc920ce5fbb7a61921ff889e2ccc8b46
BLAKE2b-256 6ced3eb2934225f125307a5c6ef7f820cff7152a68c029d8878713ba7bdb9ce9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.14.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 faef7fe76af9373656660e2e652e3d330735e84680649f0d74c558a0460f0d55
MD5 fed8a073f2e2208d7e5821044552baee
BLAKE2b-256 9a07d56eab12e3a6b5764dc4b3001cf94720eacb946a1f62804034ee1ca7d878

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.14.0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e28932882a0f893a295b391b05b0af9d95918e2cd10d6d58991e3282c06c0bd3
MD5 6328e3b8022fb87cb8865ba84366689c
BLAKE2b-256 bb3e848197dc9eef74ae8015d1a9ed02435740cf467a98423e967dc89cb6315a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.14.0-cp38-abi3-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 6b970e6f503464918789d76c43d70d93d85ef82dc6dbec9685483c60c36ba491
MD5 688f3ae17681d327c3793f1989b3510b
BLAKE2b-256 c8b0b0257ef87ccc19ddd29c5827f133c10e155af5944ce8708a2f46488741eb

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