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

Uploaded CPython 3.8+ Windows x86-64

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

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

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

Uploaded CPython 3.8+ manylinux: glibc 2.24+ ARM64

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

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

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

Uploaded CPython 3.8+ macOS 11.0+ ARM64

lancedb-0.16.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.16.0-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: lancedb-0.16.0-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 25.1 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.16.0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 357a4cd2d7c5bf9677f84f7aa408d6c98c9d9012b3110979b126d40d30530e12
MD5 97d00253078af5024a22478a6b744c37
BLAKE2b-256 fc8865a3540a0e66f5a1636b0fea715c475e733ca4394452c1095dadfcfe7708

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.16.0-cp38-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7135cd4733c3f7bcff7bc5f017bb79dda8e23dc3530476e0b91a4cb3ffef9e2e
MD5 7e4f197acce1cbb0e8f6303acba5ea1d
BLAKE2b-256 d79ee027daeec233623fa1a0bee9479f40ef819f9af0dd873ed93062f78b72e0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.16.0-cp38-abi3-manylinux_2_24_aarch64.whl
Algorithm Hash digest
SHA256 84980ccd4a170a5a07f83c85f90841e6995a05dc92cadedcb806401bc60f832b
MD5 19d0a892f3d22a90ec1d97ba8cc119cf
BLAKE2b-256 f60d39692b1e43e02860b0fc827b5cf2d61b377de8096adc44f0ce2b4cd42d97

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.16.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1e466b2c734f8dde5d037b082cff1ccd9a913e7b87ecc73efa7d921ed1aa6ded
MD5 3afb3f583218d1d51f1d42c86a8d177f
BLAKE2b-256 ac8de3afab600d9437db4d4f8eb1dac9b493778ec0d37e374313b39fa146917e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.16.0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8e0968e6b7a3611437dc4c4f468aafb4e665aa315ee0b201e589ea1fa433b5b6
MD5 3df53a7497c3edd4316eb44c792b4aff
BLAKE2b-256 b92525f8494e164ec83212002018053271865ae06ca4cc5976e3987515fdeb2a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.16.0-cp38-abi3-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 3521c53a116bfbb054318a35b2297cd01d57e1db500de4ba3cc7fad6c4add98c
MD5 7c59cfb1d752fd656d09f1f8d3a2ff55
BLAKE2b-256 73a6a9c5077e8f0391b637c5a6e7a2adfc43418e1949a931149bd14f10c87871

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