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.3-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca87b8f10b696265226fedd3d04546806eeffa81d47dc1fee0be7835ad023d7c |
|
MD5 | 85c2b7af11d922647dde4e4b8c236cca |
|
BLAKE2b-256 | aac3a51f068029fa1eb21b3e059ffc559650a57ed619a36b0b7396a096e52294 |
Hashes for lancedb-0.6.3-cp38-abi3-manylinux_2_24_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 643df736abb4f0fc076b55078cdbe52d5e4b44909775a3e0bc0abd71c9dac808 |
|
MD5 | 483a0dd5abb3f1f5d5a3515601adc7d4 |
|
BLAKE2b-256 | 0969d41b44107f67231527d0d8c74f196d20c97bc20e392cb38e0582c8c2d06e |
Hashes for lancedb-0.6.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fde7bc38a451e7721d2f3d5f3f7da1b754f575e211a91e8df9b2c779387a090b |
|
MD5 | f352fa68ad0b8ebf78e59bd0ccf74e9b |
|
BLAKE2b-256 | a0455b529183f51b0571b76760ad00344647f7c998e2d7c349375c336ad41d0c |
Hashes for lancedb-0.6.3-cp38-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56e68a1fab85d5ed9e203fb88813b707248c272f3d36d60d6e47aec77896b226 |
|
MD5 | f1fe268a3148f47428bd18c3e4bc3de3 |
|
BLAKE2b-256 | 3d76d1a3d98d3f5f560cf1ab35b28dbe352971c7a04aede6fc35267426fc921d |
Hashes for lancedb-0.6.3-cp38-abi3-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d090eb3211d594b0025d3d0978c6999db4f79b30633309eaabe1423ac593a23 |
|
MD5 | 957025a33d5c5a8a992b7dbb7eaf17ea |
|
BLAKE2b-256 | 49041c90de120516d92dfff1df4b93f5ad855fa33b0418a70f687a5613343d39 |