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.8.0-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae32fadae2310a5bd95123cf7df07a614c9de06530c5c12f342d31ac9964fa10 |
|
MD5 | c959cc83ecfe0c533d45b3111c871d6a |
|
BLAKE2b-256 | 1b4e24531d53d3d68ce14aa16da71cb6ef598ed122dd5509af47c7f6f2a0aefc |
Hashes for lancedb-0.8.0-cp38-abi3-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 126e9891936be83690ddd8e3d8bf5f947b08dbe47a31ec41dfc8999335ada135 |
|
MD5 | ea45066a9388b46b2589c7275a957aed |
|
BLAKE2b-256 | 1f2647d7548fb5e25636e03f0620faf1a5e64eb4df92bced11e4b05b3268e76c |
Hashes for lancedb-0.8.0-cp38-abi3-manylinux_2_24_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 627834390660ad3e0a4350dcb6eca169139d46bb9a678b509c31445cd011e733 |
|
MD5 | 15e2870dc5a5b2f4f452c828314b4fc5 |
|
BLAKE2b-256 | 6aff3742660035683c7127cc8f905fd5a3b1af9b48f938822981c51a95dcab3a |
Hashes for lancedb-0.8.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab3e01ee064187d77556d75d6bd90940bcc4d65c854adc858be52fba204ded47 |
|
MD5 | bb9f328ba07881c24f23892235f7a43c |
|
BLAKE2b-256 | ff2dad7a56622f36a4b5014ff158894acd39b754996860ab78eb4e0c56acdcf0 |
Hashes for lancedb-0.8.0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b268ee0b70c845999f0c42e2906857e5da9c39b50c978d922a36b8aed9c4a163 |
|
MD5 | 877adfb34b3851f9bfa11dcf64a86cdc |
|
BLAKE2b-256 | 61a966b37e998233d1a952ee849ea0b3e43de929a8c62914bc3d85dbade2e6f4 |
Hashes for lancedb-0.8.0-cp38-abi3-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60b86d7e976ba3900d84687252f6234b7ed5d32e13f012ecd2d85a7994d7bcdb |
|
MD5 | 4bb81f89bb57af3fd09b684985d106e9 |
|
BLAKE2b-256 | 223a6a9fadf85aa1f16219bfa63d9447c7f6205546ee5af6eb82c297d8e6349f |