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.14.0b0-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc573e68fbe87237f10b823073af71b3dcefb7519df445a9bf4ad2dc9b979c2e |
|
MD5 | 0bdb3ad1df442014120df18edfd2f91a |
|
BLAKE2b-256 | f10bbec6856abd6ff5fe2794bb6dc48f9d20b185123ab0cf3ea8f48428c7d176 |
Hashes for lancedb-0.14.0b0-cp38-abi3-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ac552e8924ccb73122dd371415d9e81f10c130673b95e0c42ae14af7019e573 |
|
MD5 | 328976e001429e569261dd8e07855270 |
|
BLAKE2b-256 | 6790c9856c29b816ba4db183409cf0a61b01082265cbaf18b09f5ad14a44e06f |
Hashes for lancedb-0.14.0b0-cp38-abi3-manylinux_2_24_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ec6d852f45839bb35332ad6c900da51286f290007fa7dc4814f18242eaa35fb |
|
MD5 | 3b30da70d0dd6862ff40f51d791c1153 |
|
BLAKE2b-256 | c7a5399c07f487feb1b3be055d5cafd281e6adbfd713fc8dfca83a7af7592acc |
Hashes for lancedb-0.14.0b0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 862875af00243865aaec6c7180176fe4e4e99601689282a3eca802de7b718d49 |
|
MD5 | 40aaa9b6c14e1eff112c3c5746c4a1a4 |
|
BLAKE2b-256 | f96230765f47debb230dcad801184fe3395d016e406aa1e9a6b656a1ec1a86bf |
Hashes for lancedb-0.14.0b0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4004c4aeed7650b7e67da6d8b90f00bb1226ad32167916306825726846b59edb |
|
MD5 | 54fa61efbdccea9c0b644847ace731c1 |
|
BLAKE2b-256 | eb966c5ff46ddb121b26e123334efe2d126c7633457b8e4fb3afacfa0ff358b2 |
Hashes for lancedb-0.14.0b0-cp38-abi3-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7884b384ea48aafcd21fce9f37e42c47d8a5849e72d8d38213f7b8dc485ac813 |
|
MD5 | 91d2fcfd634c5d7d1cbff8ad66e915c1 |
|
BLAKE2b-256 | 7a20f16f4234e298f4082db0d179cf1b6ea63da7ce20aa425290407ec954a13b |