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

Uploaded CPython 3.8+ Windows x86-64

lancedb-0.16.0b1-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.0b1-cp38-abi3-manylinux_2_24_aarch64.whl (25.9 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.24+ ARM64

lancedb-0.16.0b1-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.0b1-cp38-abi3-macosx_11_0_arm64.whl (22.6 MB view details)

Uploaded CPython 3.8+ macOS 11.0+ ARM64

lancedb-0.16.0b1-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.0b1-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: lancedb-0.16.0b1-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.0b1-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 2aef7dc0d02526a4f1ff98ec45def75ed5f4c72ca9e3b21f3378ec43a5f8ea08
MD5 3f4035c0aa22f355d9a7b54a3a7b7058
BLAKE2b-256 5de7bf44cb86a92f3a3b1217d181cd6624f29e416b6a8e1d6973e2af027e0745

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.16.0b1-cp38-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d0b17f46dc2592a64d83adbac1305d6246445292b5d55eee22103939eb450ae9
MD5 07d80de8765b206d64dda15c221195ce
BLAKE2b-256 7c0eca558a88d6b7b54c540c8aa199daefba16f111d43c0924883a0a21d8c31a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.16.0b1-cp38-abi3-manylinux_2_24_aarch64.whl
Algorithm Hash digest
SHA256 91476efc967be16724757f7d5b14271fb268adfa34c2a5643e92597ba9c598ea
MD5 2a90a93195e045c783d9421ec043c2e7
BLAKE2b-256 21271f983528a8789eb1b5daec4134e26e5875998f7d6bcb54bb854bc6442f38

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.16.0b1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4e218e206a7c4514619eaf9229e9a39adc8dcf9a33fd29835254993e9d36e1c4
MD5 22c02e6822c2ca64172b2c237bf6da50
BLAKE2b-256 cf7ae45bf18122929a6c5f0e3354b054388cbb8a81f09e1417d88b16553d9294

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.16.0b1-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 62756cbf653af02dde6ddc0fa31551513c2013c098f9bd111aea53734746d954
MD5 471eac752a6147e5e9b350c72cba3051
BLAKE2b-256 cfd1daef84a8368314a62f54c5d76f77013f3e38f30cd859000ed568fda108eb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.16.0b1-cp38-abi3-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 39ea1e0c94212689e15c563aff5e5ddf8578c4ec2d39cd9ab3377d2f22c4b2c9
MD5 53a7059bd5dac3ca4ee0aecae9148975
BLAKE2b-256 c75657b39ff6704997dd1c5517a4de996640eb8e89f70ccfefa7220057df8bfe

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