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.0-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ebba3ebdd37d6d4555de8a9366068db38971eaf7c996c5ad1dd14ff36caf9b94 |
|
MD5 | 1da6937d469a283bd809ec4bff3e0e13 |
|
BLAKE2b-256 | 1291dd89d1f43580afafdc32c9f0602753736426d2183e77fe692143e8236a07 |
Hashes for lancedb-0.13.0-cp38-abi3-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4cdd18788d79f200baaa3003a69779e18fb9e661b4b9e658898e906dca0b60ab |
|
MD5 | 4045a2593d8bd948307ce0f8a07ca7d5 |
|
BLAKE2b-256 | 31409b52b4da1d0c0c7cd7f91a5e10a867346104223f618ca8b7191f1a6dd32a |
Hashes for lancedb-0.13.0-cp38-abi3-manylinux_2_24_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ae7be0f39a854e62838deae679f77ca1d39ea64a932a5e5e7f417cd5aece103 |
|
MD5 | f66d156ed174a58d50e30dd5cc709e38 |
|
BLAKE2b-256 | 92b61a65c44717f68e29afb512bfae7e80bd0a4374720e19cbaba8ec5d809694 |
Hashes for lancedb-0.13.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 045ce4b59bdd3df6aa538366ed8f20a5abfcf120fca7b0389e119dbdc4d08d6d |
|
MD5 | 0c073ccb370a8e896980c0c2f460e717 |
|
BLAKE2b-256 | bf66e6ba90bcaa3952a6bccf6e6bebad65de3725c7e0d23f40c4e05a74c8d80f |
Hashes for lancedb-0.13.0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f970c46af46c3fb59979f155f9bc1e2c2d597f23286708b5880e20fa9000c2c |
|
MD5 | 77af87112f01c7a91d4b9eeb713e5d79 |
|
BLAKE2b-256 | 1acc1acfa84f8e0a44c23af84a9c2bab1b173e6c3c0b05326dee4e6e55617159 |
Hashes for lancedb-0.13.0-cp38-abi3-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3fb1b1e5b03d287d1f6969887fe17c8fa9501ab0da57dd6788181610028d8e37 |
|
MD5 | a402df34a9bf45479fd84d1128363537 |
|
BLAKE2b-256 | 36bec458fbc4783543897d8bfbe18e7c4635cda38c0f09b2034292fe58a72360 |