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.0b1-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7852d9c04a4402407af06bbbf78bf339a169f1df2bf5c70da586ca733ec40a68 |
|
MD5 | 9d4fdd18deb833aa241b3baf3c50a71f |
|
BLAKE2b-256 | 2121c1170f439cef7fdc52222f4c5ebc7f8b50f36626d43c5ca7f1ca2ee4012d |
Hashes for lancedb-0.13.0b1-cp38-abi3-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fecdd71f137e52193bfb5843610f32fe025a60a1edf5f80530704de879706c6b |
|
MD5 | e7089c2e0ff1b3a133730cc1cdfbdc8f |
|
BLAKE2b-256 | 87646a4e93eb79d2bbcc418f7ec92af46a44564395871d73c2ed22027b9fe107 |
Hashes for lancedb-0.13.0b1-cp38-abi3-manylinux_2_24_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 231e1f00d724c468922f7951d902622d4ccb21c2db2a148b845beaebee5d35b3 |
|
MD5 | a73e23da0b08722c8a6ef0e7ccdc412c |
|
BLAKE2b-256 | ec3406c45540a0e6e40e2f730991cdce3084a81f6d635fbc66e8c5e4a7a46875 |
Hashes for lancedb-0.13.0b1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbe8fc15bfeec89b6b2a4a42b4b919b6d3e138cf8684af35f77f361d73fe90cd |
|
MD5 | 303ea57c49ca543fb69bb3aaeea55ad0 |
|
BLAKE2b-256 | a45c68690079dcff525e57ab199af5dc38b4b2f3c04b63ec73242f5b72fa8b1e |
Hashes for lancedb-0.13.0b1-cp38-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac00684f7e90ffc1b386298670e2c4ddaea8c0b61b6eb1b51dbd4e74feb87a86 |
|
MD5 | 2a541b43aec4055e19e533881ec5598b |
|
BLAKE2b-256 | a0b8a37e5db3713978c0b896e56a97252d2d6d14f942f5567ce42337fd391e89 |
Hashes for lancedb-0.13.0b1-cp38-abi3-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 687b9a08be55e6fa9520255b1b06dcd2e6ba6c64c947410821e9a3a52b2f48ec |
|
MD5 | 1e7f6d64e36856733497ed947a540016 |
|
BLAKE2b-256 | 4b28db3015f2ec77c211bfc3feb9fab7f86352533ca2d38f0b48f33f24a3f050 |