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.12.0-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4e63c3b5b3ce40303ec350ba7000bfb7c7c181b7de59c7950f7c2c4bda0421c |
|
MD5 | 1fbc536301092acacb3077c26a79e6ab |
|
BLAKE2b-256 | 30e0568c1b00b00fb73a8e07e8581260f525fe56c4667b0a9a58b5cb89a9bf17 |
Hashes for lancedb-0.12.0-cp38-abi3-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c52158181b6f63cc24a93c11f4bd038d8932ac8c9d14ef9c6e6aaeefb54fb1f |
|
MD5 | e5d84621a7db866c4b8a194ca08b853c |
|
BLAKE2b-256 | 130d5f9ffba0599e46b29d915e9c2930ec5d220a9579bdeea37955c62fd139d5 |
Hashes for lancedb-0.12.0-cp38-abi3-manylinux_2_24_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | db9d4f37252075ede29e090517eb15025d85edcd56001e788b7b7a22190b2028 |
|
MD5 | 650fbae03731a1ffcf56d6d7f2af0990 |
|
BLAKE2b-256 | 3eaa37bfba260fa6468c9d6800154eed9c8e39553df45d5caf26412e1e815cba |
Hashes for lancedb-0.12.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea79b71f2382a3974447a341e0fbb904b9db70269f32378f4cb45b2b20b90771 |
|
MD5 | b603ec61cec7da336f6dc13810eb917e |
|
BLAKE2b-256 | 3ecc52207fd50d913284a59e79651cadf76b07d9471b31521f7228b0047c7b92 |
Hashes for lancedb-0.12.0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07a92887e470befe5d89ef960afcd516bb9501796458751885499d31c1e448de |
|
MD5 | b2d6b57b789580a6489e3830a32f8a4a |
|
BLAKE2b-256 | 334d148ff2b60eae89eede1bd6c656efe8ba293189444d18952c4c0f1e9feb39 |
Hashes for lancedb-0.12.0-cp38-abi3-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28df523b1b1d7b3db47ee95baa8dd85b94238e811a1b04de91083b47aa28dcb5 |
|
MD5 | 0cd2b28e8c912d02aa7540e52f9acbb2 |
|
BLAKE2b-256 | 656e2295efa92da9d56ae95b57e71773a186020032f7129126336910ac9b529f |