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.5-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3b294ca0250a5ab5d25954a4d38d7c3845feccb9df0f257182bb3e32b38833d |
|
MD5 | 03f13b9795d77741046eb9d3667cca63 |
|
BLAKE2b-256 | 75331e0dfd941f3a1690aab9b74cb5446f384d13ad7609d3fb8144ca2ecc28b3 |
Hashes for lancedb-0.6.5-cp38-abi3-manylinux_2_24_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 769dee182897ceb9cf17bb19fe8c871d342b4248925bf8b4d879d5b48f397228 |
|
MD5 | 8ade89cab2c4f858956d7007293a8cec |
|
BLAKE2b-256 | 23966f0858aebdc39af6da510c27f37396fb034fbc452478efa90c81a0753990 |
Hashes for lancedb-0.6.5-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 524245eb5a9ab5912e69a74af81737f4513ff426b9670333561cde19dcc7e0a1 |
|
MD5 | e0634098572f6e7c9260a3f17d1d0617 |
|
BLAKE2b-256 | bf3497743a2284f87f4973e147ebb5f82dec17e293aa8183dab0e6f0e6af0332 |
Hashes for lancedb-0.6.5-cp38-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5da69063b50bb4329db1d71534b8c6983f9c50b2f6ec34cb84b3d85cc52dafd |
|
MD5 | 63c4575ce2e6007782306b7e300a748b |
|
BLAKE2b-256 | 0b24ff951e8d8007c6f40f42c257752a6aa2fcb3c46f682e2dcc7e510e1f4ffb |
Hashes for lancedb-0.6.5-cp38-abi3-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29a341a148ba53de9e72af5ac2f8727073bdb5b9b62af12303d31f487df179cf |
|
MD5 | b15bda8ddd66f6735468c67059c09b30 |
|
BLAKE2b-256 | daffbdbfa918036ec275881ddd9c876bad121077e7da38606fbd4cda978b0af5 |