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

Uploaded CPython 3.8+ Windows x86-64

lancedb-0.16.1b0-cp38-abi3-manylinux_2_28_x86_64.whl (27.5 MB view details)

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

lancedb-0.16.1b0-cp38-abi3-manylinux_2_24_aarch64.whl (26.1 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.24+ ARM64

lancedb-0.16.1b0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (28.0 MB view details)

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

lancedb-0.16.1b0-cp38-abi3-macosx_11_0_arm64.whl (22.7 MB view details)

Uploaded CPython 3.8+ macOS 11.0+ ARM64

lancedb-0.16.1b0-cp38-abi3-macosx_10_15_x86_64.whl (24.3 MB view details)

Uploaded CPython 3.8+ macOS 10.15+ x86-64

File details

Details for the file lancedb-0.16.1b0-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: lancedb-0.16.1b0-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 25.2 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.1b0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 dd561152f7ede0eb1bdb88acc697d807ae660f725a956f99b44f2ef816c23ce8
MD5 266da6ec4ecc030da6b72e4477fffa0f
BLAKE2b-256 d08865f506413fe76a539c92113fed5feacb9319adbb84df14f464654999513e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.16.1b0-cp38-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 412f5778f9469688265baf627484a82ec5e4e0209700dbd7884b01472501d641
MD5 0e5de89393c5b6e3bf2795bf73863c34
BLAKE2b-256 c0ddec3bbc891bc81c66334dc6eb641dba4dbe6de3b9613002ca9470dcad8dc2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.16.1b0-cp38-abi3-manylinux_2_24_aarch64.whl
Algorithm Hash digest
SHA256 d162be256a2d8f2976bc58db7cf2d5682b230ed96104e6e5b3945254119d278b
MD5 395b8d9bb3ad2efb180a6cbca7082756
BLAKE2b-256 2d3fb730a3e5017039f35d958e6c0ab1016a8b83eed1f68ffb039cc788360665

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.16.1b0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3bcae57be96097f3519e70951c1ef31df2aa2cb2b0d01f71d218046a43decde7
MD5 d94cc6677c6c9a23f6110d7ec25f5c09
BLAKE2b-256 c2c4648b1a1e6db7c50d2264154909b6ace1def6d3cea940c38f668a5883eb9c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.16.1b0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 406f82a2b5edc21af3ab13e3217ecdc39b40f71604a852fbbef62d8756b6e6dc
MD5 8a977589034540f652d5d4ce5c05ca00
BLAKE2b-256 81fd8277286bebde5909b4f766a6d25d4f4d0f1de47d0e6c83a6ebc9012bb3bb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.16.1b0-cp38-abi3-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 77c1d3c394d8e6ae05f4de3bff213a36a62175a8ae5e09a41cfd3d9d45f0667f
MD5 69813cf809c1e8cb7bf90f5d045589cf
BLAKE2b-256 403259f6604383842521fd09b1fef16ca54f32eb3185c55cb69439ec37eaad3d

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