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
matruin 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
Built Distributions
Hashes for lancedb-0.6.0-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9cb0398f0e2038fa93b6fd0263983ba50bcd6e4935ce7e3adfa1366c0cce6b2 |
|
MD5 | 69b550a0edcad4d5d0decbfdebf43144 |
|
BLAKE2b-256 | 929e9698fbae0d81b2b8257fd01215bff55be4be95ac03f09f0cde8f19a08903 |
Hashes for lancedb-0.6.0-cp38-abi3-manylinux_2_24_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2012bfa6cdb82f3d6f8796c12c68355d413579066f23576df7f7b962473780a |
|
MD5 | fae1c0cde6067552cb5162d68cef1022 |
|
BLAKE2b-256 | 968e49138e2a2da12e5ce91559ec3d4f6cece3e57a5eaa5d05b7edd3f019828d |
Hashes for lancedb-0.6.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0de551accd0bc04a419fbca6f29c21c53ca38b770b4a023f6983521fb230eb3c |
|
MD5 | 8db5aa97374e7ccbd47e4215737adc7b |
|
BLAKE2b-256 | 38354436978511f4aab93f228098fdbdaa9a329790e01981bf316bc107fdf689 |
Hashes for lancedb-0.6.0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c2942352fce2b14a5ca20e86c061d7f00c303e015aaba817a373609fb0cfb22 |
|
MD5 | 5d235d6e87dacffdfef4c33476f4c824 |
|
BLAKE2b-256 | 125f069fe14c85415c30639acf7e1a824ea0612c095d176e3f44685a8ee44956 |
Hashes for lancedb-0.6.0-cp38-abi3-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7c0e06bdd38e6214ba1b071b995cd2ddf4fc53d96a9f46b5865d7a58c25a6d9 |
|
MD5 | a537ddad14d7c2264e5f626d043e4707 |
|
BLAKE2b-256 | 28c5c5066f7db75fa7cfdcea1fe6a2991a878038a5cea44fd141f2660f00d646 |