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.2-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4691402da89aef48ec31ab15ad97c204465bcda907aab1f59b2f6b6dd6704536 |
|
MD5 | 8fe9eca705feb9f535227d013d052cb6 |
|
BLAKE2b-256 | 6ef5ca130e73bc234a5945d691910cdcd2ace73e32293485308e61ae970d64bd |
Hashes for lancedb-0.8.2-cp38-abi3-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0bc3a44eae8722108d10abf525a79bacc77125712e8a7fbdb3645889dde82b51 |
|
MD5 | f1756c4066db47980c10250bdd81a68b |
|
BLAKE2b-256 | 62332e28cd3ab2e721dd94377e737f3957be41b47534e2e897069076dfbf1b9a |
Hashes for lancedb-0.8.2-cp38-abi3-manylinux_2_24_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9597fd42b595f987a0ab611f76646d02175cecb95d25dd3a5db9274d223d87d0 |
|
MD5 | 21431f0bc88b7a1196fcabad98221201 |
|
BLAKE2b-256 | b5275128e42d6727e49b0f5ab5fe9952e9fb0560ed6d3c6681e47b9951bca9e0 |
Hashes for lancedb-0.8.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f700859edafbf42bac08d28ebff1e64d808c9124cd30e9bec974c004194ddc06 |
|
MD5 | cf99b124e348bce11d491640f26effcc |
|
BLAKE2b-256 | 021365ffc23ab0818ad97903946d89d1560c0ac0119c5b5ee7242bd3e40cce09 |
Hashes for lancedb-0.8.2-cp38-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b605bce96e39a50978be9f2fac3a480a595d95dd60d6e80f4cc658deecb99a68 |
|
MD5 | 6b6e5e0c833e733cdccfa100a6f24220 |
|
BLAKE2b-256 | 57dd777d344cabac1dbd28499aa31b1cee6bd8b68a45b9fdac81036ae3dd865a |
Hashes for lancedb-0.8.2-cp38-abi3-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 542082d7fdd2774d25d3fb2100f088b7e51ee26fcadf8f9fd43814af8b0e5ce6 |
|
MD5 | c2eda2b40657a7dc646c8a7694f04ff8 |
|
BLAKE2b-256 | 56a83daa97a8480b45a86a13eb32074e6263490265580f606115b2f24b4554c6 |