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

Uploaded CPython 3.8+ Windows x86-64

lancedb-0.6.11-cp38-abi3-manylinux_2_28_x86_64.whl (19.0 MB view details)

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

lancedb-0.6.11-cp38-abi3-manylinux_2_24_aarch64.whl (17.6 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.24+ ARM64

lancedb-0.6.11-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (19.0 MB view details)

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

lancedb-0.6.11-cp38-abi3-macosx_11_0_arm64.whl (16.6 MB view details)

Uploaded CPython 3.8+ macOS 11.0+ ARM64

lancedb-0.6.11-cp38-abi3-macosx_10_15_x86_64.whl (18.2 MB view details)

Uploaded CPython 3.8+ macOS 10.15+ x86-64

File details

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

File metadata

  • Download URL: lancedb-0.6.11-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 20.0 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.11-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 ea12fc94545afb03933d080cce593491e593ab95cbfddf05ab7183bce2bc8d62
MD5 523e3099a3d38dc4bb6cc0523d21142a
BLAKE2b-256 3eed2af29d4cb767fb25061c25046751770d69a5eedd83938ca72448689354d0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.6.11-cp38-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d789d5a181c4bc42650567cb63ce2772ed902046b08e8e401970df284a4df1c1
MD5 8c4f9edecaf0a0c3c57c5f6d894fe697
BLAKE2b-256 c9d1f4192cb739c4d2670a8ae60fd995069421fd3ed3edd7ac7985e4cf2958a2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.6.11-cp38-abi3-manylinux_2_24_aarch64.whl
Algorithm Hash digest
SHA256 b6b289599c4c6a61a70da89d4c3201abec7483d0e03573506014af2dcddfe0c4
MD5 c53b549b59d038183b883f183a38eb61
BLAKE2b-256 599e52ebe60a715ba7e1c614b551f34908b224930f56763550efcb6ac9c7c439

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.6.11-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0998c2dae676c24b95d492358f80ef6e5100b86335b96bf402af3f28f7ec4f3b
MD5 ab1ebad5c50933b3805b1733e38bcd5c
BLAKE2b-256 6269bb77ceb9a59ddf44156e2b2c224357276eea5df098a23dd87d3d6bf1a31a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.6.11-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bfc6661e1fe5dd75346b4a1980243b4ccecd2b0ad991f8becc6e506a608c2d8a
MD5 8f8454df7c4765abc2119b41b2d11112
BLAKE2b-256 675bb3b68f269730817f59a460a155a9d1a62c7e6700a8160690541510351da2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.6.11-cp38-abi3-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 79dbc2a79dac7b843e328a3b7eecb1b42f38ad524742111a38efbeaa1f58ddfe
MD5 629b962b9029a1a20106024a27e80017
BLAKE2b-256 fa37b9d684a32bc275bfb57ceeff597c0cf0ebd54825ad4783476fcc003b86c8

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