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.9.0-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba5bdc727d3bc131f17414f42372acde5817073feeb553793a3d20003caa1658 |
|
MD5 | c5d11a02d2bf06d926b6d2aa40fe2378 |
|
BLAKE2b-256 | 2cf2636fdb01d7a2e4da8993716c85d62b4525bca260bdbf2fffacec1473c948 |
Hashes for lancedb-0.9.0-cp38-abi3-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78dd5800a1148f89d33b7e98d1c8b1c42dee146f03580abc1ca83cb05273ff7f |
|
MD5 | 5fd2a99a53575651e2b5044311ff25f0 |
|
BLAKE2b-256 | 6522f005b641b70af9379ecb41ee6370f5a7d2efa4248bcd60031bebc0c02f05 |
Hashes for lancedb-0.9.0-cp38-abi3-manylinux_2_24_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8c1f6777e217d2277451038866d280fa5fb38bd161795e51703b043c26dd345 |
|
MD5 | a41ca236e2e3c3e840db5cb3efb4a3ff |
|
BLAKE2b-256 | ad679b7ba981269f0abe18ac46097734998d17f1f0e6fbe10d82eafacd6a3abb |
Hashes for lancedb-0.9.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f093d89447a2039b820d2540a0b64df3024e4549b6808ebd26b44fbe0345cc6 |
|
MD5 | a4e0aa9333d745e49189308d16b292b9 |
|
BLAKE2b-256 | 64e972466a2d62843c745f365896c8ed1f7f4cad24a61b3214a1bf4bcc64d104 |
Hashes for lancedb-0.9.0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15129791f03c2c04b95f914ced2c1556b43d73a24710207b9af77b6e4008bdeb |
|
MD5 | 90696add01080e9b7e43a51aa04c5992 |
|
BLAKE2b-256 | fb90bf8d9d46e620ffe0867b71fb6591ed1d6d80d167410c22a3e31862e71190 |
Hashes for lancedb-0.9.0-cp38-abi3-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1ca08797c72c93ae512aa1078f1891756da157d910fbae8e194fac3528fc1ac |
|
MD5 | 034fe04372285630ca15b373103294b4 |
|
BLAKE2b-256 | 0394206672df19f22408d975a185566a7477c95d7a2473900baf8ee9e259a172 |