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
Built Distributions
Hashes for lancedb-0.6.13-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b851182d8492b1e5b57a441af64c95da65ca30b045d6618dc7d203c6d60d70fa |
|
MD5 | 95de7ae1e7e17c27af58fc900421303e |
|
BLAKE2b-256 | 650c235ee5eb8e661774de03c5c2bcbe895a9345b6cb74476f9cfb8f2a45a9e5 |
Hashes for lancedb-0.6.13-cp38-abi3-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31b24e57ee313f4ce6255e45d42e8bee19b90ddcd13a9e07030ac04f76e7dfde |
|
MD5 | eabbb982acf2890a958b6e6333cfa048 |
|
BLAKE2b-256 | 43095529c12f39a4bd3b2ad8c07d2c7c014853ff061e6db6648e4d471f695504 |
Hashes for lancedb-0.6.13-cp38-abi3-manylinux_2_24_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61af2d72b2a2f0ea419874c3f32760fe5e51530da3be2d65251a0e6ded74419b |
|
MD5 | c760f18d2c01e6cfe438032cc1220fde |
|
BLAKE2b-256 | 913fda4f67dffe6a52dae088a22bcb4583cd0723841ad3fdc5947a08c8e1abdd |
Hashes for lancedb-0.6.13-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 837eaceafb87e3ae4c261eef45c4f73715f892a36165572c3da621dbdb45afcf |
|
MD5 | f3f6e67371d74b2a0662568c14f267b5 |
|
BLAKE2b-256 | 80fba1197100a23ebfbe83748cd767ff5bc10984fcc68de61bfdd5c41194a219 |
Hashes for lancedb-0.6.13-cp38-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e22533fe6f6b2d7037dcdbbb4019a62402bbad4ce18395be68f4aa007bf8bc0 |
|
MD5 | 23a0730d8b068fe3d6c59bb2be293d3c |
|
BLAKE2b-256 | b0aae21c5289d07e774a46ec31b30a17400300159f527662b473bd009ae30ea7 |
Hashes for lancedb-0.6.13-cp38-abi3-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4667353ca7fa187e94cb0ca4c5f9577d65eb5160f6f3fe9e57902d86312c3869 |
|
MD5 | b5dd5962ab313d120fa5665cabb00c02 |
|
BLAKE2b-256 | 1253ce8f312d1bb1293ec8659d5282049789bb6f6b087597a108c15f8f0da83f |