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
matruin 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.4-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d20ee4dddfef71177edc601892169d70fd1e522c9b51fe852fab72354d5cc0b |
|
MD5 | 864ad145f52ee2c1d222b7db921a4d4b |
|
BLAKE2b-256 | 0d70342dc2f77cf4792e20a43c48694677e8d495ce74e87d0b53a94ce192f4a7 |
Hashes for lancedb-0.6.4-cp38-abi3-manylinux_2_24_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fdc9f5e4eb70a46a30f05e62d8cfaf00aaae3cde7a527ef3a57af8e35d3b0b6 |
|
MD5 | 43b2979f14171391548cb2fcb0aac98f |
|
BLAKE2b-256 | 8d63ef13bdb6d8d7a58bd22521629dfb71630f057a4ff11f55f8c7e746fb289c |
Hashes for lancedb-0.6.4-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41b00f4ce13a5adbd66ca43a877ba5e9ecc17b526378bdceceb89849183fee50 |
|
MD5 | 89feb328852e4fc00a32e77cae9fabe6 |
|
BLAKE2b-256 | 98ad095ea15816fe1526430819d823a3b4edf09148236dbb7fdd4142fce80cd6 |
Hashes for lancedb-0.6.4-cp38-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1883953b97c829a3673ea7b6e5b1facbd77c5841d800638a11725f91041d5418 |
|
MD5 | c34a0e475298ca8d570a0d5a415181d4 |
|
BLAKE2b-256 | 193da8ce2761c3b07b4db432a087c5b8916a8af7716932c773a5cd96629bb99d |
Hashes for lancedb-0.6.4-cp38-abi3-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88193e85f229e06fde4fbb6fca150bd54cf4ad8853560fd1db5877fe7129f381 |
|
MD5 | 628268bacf2bc0d306ddc78700bdf51f |
|
BLAKE2b-256 | 1666f64c8694caadf7200b2bf262cea755e193fb13727e882d55bc24f69b87f5 |