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.13.0b0-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 419eeba877be66fb298c54735216da46630e5b735e0a2d2dfde1f886552b9315 |
|
MD5 | 47f85476c9f805f3338f7882691709ba |
|
BLAKE2b-256 | 553e6cdeaca20c1c336a677c53f61846c88e76cbdfd1ae90963af1036cd4f2d2 |
Hashes for lancedb-0.13.0b0-cp38-abi3-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9b3817183b42cef3a7dd85d8073dd9eca4ccc5550302f5410a055742f4921b1 |
|
MD5 | 7e4ea1675273b47ee5f8a79c3cc27d06 |
|
BLAKE2b-256 | dcdc184cadf42014a078a5fb956073c69fbdb33d6e2ae0e9229ae0c3961cee8b |
Hashes for lancedb-0.13.0b0-cp38-abi3-manylinux_2_24_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f95e0bfe53f59ddd17eb06be53e83dcef81426c3c5bc159bde176a431ff42bcb |
|
MD5 | 46bd34cce1ea5d0d53339a8b7a953f17 |
|
BLAKE2b-256 | 44485f91af46fc93799e046f2aa0f7e3e33517bdc94f204935fd911636d44c2f |
Hashes for lancedb-0.13.0b0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 015f7ff3507501e0748b79abc8aebfc985475a1af2381e39c430d48b715daefc |
|
MD5 | d164430e859eed360fd03eaef0fde1ef |
|
BLAKE2b-256 | 6d24470df03de168dcbd58e8f1575c599d74d62288b33f09b8c3b3ef94e217c7 |
Hashes for lancedb-0.13.0b0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39fe7b472d010f2a0d02ed387769936572168c265fb4143e436f9947f39c66ca |
|
MD5 | 6615e6454f28268b4fb422e20af01f39 |
|
BLAKE2b-256 | d6946192ee5320f618f5005d4a8081d15cfb7e7dc4aabeb9cd00cb64269f9fc7 |
Hashes for lancedb-0.13.0b0-cp38-abi3-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9600821dc7c027e81722294d5b3fae1528a376bef2cf1d760df9821ea263a63d |
|
MD5 | fd5127d0b0c2878865dd0cf18ebf0785 |
|
BLAKE2b-256 | 91e963de296c6c9c4a50f50f1f4e01e88e996a4468da71db60f65283e9a14ac3 |