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.1-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f0aa79454f0cc28b1d90e738513e0cbeb16468b13ca44ebf62d5d5f14a5604f |
|
MD5 | 8536241f60bdeaa67d549a6961bb8f04 |
|
BLAKE2b-256 | ed0a517e81014d25b60d960bedf186d3ffab4af6dddc42005def98dfa2d8c67c |
Hashes for lancedb-0.8.1-cp38-abi3-manylinux_2_24_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 531f2a90c0d6f63dc268d3466baac3504b0dbd7695b7c37b91605b82560ad95a |
|
MD5 | 5fb1154c532ae7662653d8ecb7db9351 |
|
BLAKE2b-256 | 2fb8f70cd8619c2f5722baf76d90ed31778c2fb12255c1744d9197c7de01d761 |
Hashes for lancedb-0.8.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d1e85a85b70e59f6df46c91052cf2e36e932c4662fef871d4224389807102cd |
|
MD5 | 8eea91831743607711428534c0db7a5c |
|
BLAKE2b-256 | 6e4263d868451f644ca4a0915beb3b5334be69f7d2a0ff1e5b192027f757799d |
Hashes for lancedb-0.8.1-cp38-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb1930b5402b29fb08e0698281df5487421db9e7b35adbcee87f465d9d79ee57 |
|
MD5 | bd9e138de374cd8fd001d546610415b5 |
|
BLAKE2b-256 | aacf9c8c0891f89e44bf19328f8ede6dee15586872521f7e01c68f9a5845bcea |
Hashes for lancedb-0.8.1-cp38-abi3-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4ed9339fce4928307050cbf2031031c50bcd6a16b9fe4266bba2085a34bed09 |
|
MD5 | 58a0f657a03e49c3a5626cd05da763de |
|
BLAKE2b-256 | c231daba4d8594e7f0f80cc5fa93ad0a60c59f58ad9bc7d92c9786a6f4cd6fa8 |