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

Uploaded CPython 3.8+ Windows x86-64

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

Uploaded CPython 3.8+ manylinux: glibc 2.24+ ARM64

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

Uploaded CPython 3.8+ macOS 11.0+ ARM64

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

File metadata

  • Download URL: lancedb-0.14.1b0-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.1b0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 a61995cffdda659227e5ec0680dac81aac75b0e2c6780bddb7d8b8f6396f1c68
MD5 21f2ddb8005e2e7a8b7b0ea02ceebb4f
BLAKE2b-256 db375565512d79f2487425788b7b4667b3b4985f4ff900bfc2c3e5e70153c36e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.14.1b0-cp38-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 54e180adc72ea37d1af1718d8663ccc00b64e6ba8aa193404b0c73a07d30bcfe
MD5 118b767e1aa8f5a63fdb07602327620b
BLAKE2b-256 364305a1d9cd4adcd82990727062d5603ead708f3f138e9f2228a68db13e2c1f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.14.1b0-cp38-abi3-manylinux_2_24_aarch64.whl
Algorithm Hash digest
SHA256 9b7207f95100ae59ab89206ba391e475443511b0be6f36556d3157fb6ff7e676
MD5 b94da8cd86b85b5e5f20fb6ac985f65f
BLAKE2b-256 1d404abc7198b3a43dbbdaab8d37660f4d2eec88b56b4aa5ec41543905ed4da8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.14.1b0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 90ba9def472fc7b7028de690b7585563a4ce2d8c478e9642caf6ab468d4855bb
MD5 889b16700421fa96abc88beee82b773c
BLAKE2b-256 3a475c832b43253db2124de0252c60f6fe22f0c38577fcf8fe6775060fdca2c4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.14.1b0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 73fde480c159b9c6cfe110feb528386996799a8623a2146f5f776abf3cb8786e
MD5 e21081259c570509a861a6232beeca56
BLAKE2b-256 09d92fc39fde0bc64f27b6def0a0f5589c1d33a47b78516c5e019e555be0e2ba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.14.1b0-cp38-abi3-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 ddee4b16daa347edb667205b8446c74802ffa19ee16b8a0117b747054a884c0d
MD5 624a453c931526995ea2ae42638f129e
BLAKE2b-256 206712fff3126e1925b7dc8db393fb7b16189648996e9280b52fbf691776c396

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