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.8-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd2d85a10fe3551cc05d8b4e0c6af2de378e31ca4809f9170f20bb08d5c82f73 |
|
MD5 | ba1d06d3b1fadf146c6d8657def7aefb |
|
BLAKE2b-256 | 7e43cb14c21a036029e4471131adbead8d3927490f2d8d93222a25aee96d341a |
Hashes for lancedb-0.6.8-cp38-abi3-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88b144f567a26cd390e3be577562048937bfd9092a1fc628270989a64e964070 |
|
MD5 | c6a68258190becf64ca87fd5c9084213 |
|
BLAKE2b-256 | 224dadd015380d0a7add333b7d13b9fcf08d6a28eaf6389f67c5425c2d326821 |
Hashes for lancedb-0.6.8-cp38-abi3-manylinux_2_24_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba32fc0a2347129ae05b9928caecaffc8339a5b4b93bfa8d17cf85516536faaf |
|
MD5 | e6f7f358bc3eb661639568f232023a99 |
|
BLAKE2b-256 | 77d15511fb4155deb7e8ef9f15ed627ecdfb886e268c93fb314985d2f6c1be0b |
Hashes for lancedb-0.6.8-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75d01ebac64f3ac0c295ea3a800d9ee639ffacf286c398a289e4b3591b9f919c |
|
MD5 | 3583e916c1ff4e22a64ce0f220336a77 |
|
BLAKE2b-256 | de251042e8f292008618d72e80000d4a078a540a0aa28de5279334005f4e4ff1 |
Hashes for lancedb-0.6.8-cp38-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d7a9a091f600883e93254cac797316895487b4666e5f2ec4937bca6fff17001 |
|
MD5 | ccd886e9657023fd413ef36d6c4790f7 |
|
BLAKE2b-256 | 674737be57b3cb54a95e05ce4ebd71f9aed9d042a15ad82eac113a9c063d787b |
Hashes for lancedb-0.6.8-cp38-abi3-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc234504c174d66321dc09d7c97d0139081c245241e297ccb81f71b5a6d635ad |
|
MD5 | 0b4d544215ec556227f6952281073dbc |
|
BLAKE2b-256 | 21df426d8666c3d34a3f52a91648c2f2d2a34ef9fafdec3f1868d2cda3e6736c |