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.6.10-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06a299d91e1d9d2663fea7086efc784bf8643f51ff1532617c4910ec63cd2004 |
|
MD5 | e9494f6e7cb1773dbc9a3c1808be57e2 |
|
BLAKE2b-256 | 76d3312e816bab2c5e1fa154a6e694cf297a6c9ca027acbfbf8d66f47c5940f9 |
Hashes for lancedb-0.6.10-cp38-abi3-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 750fb23a6eaa7daea241a124be3970447d45ace1c4f894df197e9869d677b6ba |
|
MD5 | 8f3fff5c1670d19ced662c92290f3aec |
|
BLAKE2b-256 | 9f5f7e776fab275e1ad0619fe6355ef8ec46036b11b33fb5fa1b715c3d899324 |
Hashes for lancedb-0.6.10-cp38-abi3-manylinux_2_24_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73c0909ac7ae95d8128d25936fc0ff670cf6d9ae1b44e06ec48f3a60081d61ca |
|
MD5 | fbf93cf32bca31256350b1fb26994d60 |
|
BLAKE2b-256 | e49743f465073a940c859bbda2bd39db2ccc295ab1ae7cc63eb4bca24bad510b |
Hashes for lancedb-0.6.10-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3874f8aee55c5b4f41b953f4eac28d69c8a9bc10ad992fc7fd2b699a1f4b88ed |
|
MD5 | 82df21c6b593a3f5533e9f583e4eeb69 |
|
BLAKE2b-256 | a16f58aecf7ab84b6cb4cec84f331e96af0c6e42dc2dab256eec1082fbf70732 |
Hashes for lancedb-0.6.10-cp38-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a1548bf3820ff606e4efce840bd0e979206eb1815915fff9f738c1d8e337293 |
|
MD5 | 456d0d58d01378c1912cfc2fff6bf8e6 |
|
BLAKE2b-256 | c58a18b740ad588a2c4ad762b04a6460764d60ec0604d6a5b6f599f885207bc1 |
Hashes for lancedb-0.6.10-cp38-abi3-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7e10eb5f5fdb22452d7678e9bf3df14e2463331868607067aba4ba19a0f4022 |
|
MD5 | bb5acdc3d25f28a90fcf76d9945693d5 |
|
BLAKE2b-256 | 7f65e616af4a94d21afba8cfd20c644a1c765dd951d3a7a0c18e5411ad4bc03e |