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.11.0-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a7b0c7fc3383f947a52e0692c36a6351dd0c841dd012071bfba66044c95b22a |
|
MD5 | 68873b34f9275bdaeb6defa566479fbf |
|
BLAKE2b-256 | b6f0d68c09107e8c35b687b657751ad799e3d3632ccc42798bd74b6eeecc6657 |
Hashes for lancedb-0.11.0-cp38-abi3-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 911277e45c3ee57c650fddeb4c85669fb1377103c3992ae73a6c681f4a1d68f0 |
|
MD5 | c9e47b3c29d3ab6dcdecc3a98c9af389 |
|
BLAKE2b-256 | d8485665936f6485f48740d33edc40acc93e66c73536fabe1b77dfa8d10cb6bd |
Hashes for lancedb-0.11.0-cp38-abi3-manylinux_2_24_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe76f0fcdc44203cfc5c0153fb4cf882a64678935ae9280a9751c64d07b04f4d |
|
MD5 | ea10c9cccdee7ca2697eff46a1dbb7fe |
|
BLAKE2b-256 | b2487b59a60e8599fe9b594991cb9b2dbcf5f6be5a3a7b584fc0fe2a9b3c506c |
Hashes for lancedb-0.11.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c954dc44ede89d775159f42844f1862a18dde80c616b7bd7b5eb7c98217d0328 |
|
MD5 | 895a30ca61d02ad17b7695e6e9ff01b6 |
|
BLAKE2b-256 | cac03d923ce270e9854ff0ac5da51a03027a65bac742229d40374fa4cd6a8601 |
Hashes for lancedb-0.11.0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e8da024de348dd08f2fdf72063349ca0eece2d66a58bba723adc36af957979a |
|
MD5 | 4c4f544f3634e7cd2ae335a8fc3ec0dc |
|
BLAKE2b-256 | b5eefff5af294dbce075a3568df3e5e8ffe0a719f1cb8f4ffccd649e668a08af |
Hashes for lancedb-0.11.0-cp38-abi3-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11d56c26cd3c7db3757dd29e67f2bbe6d997f39cf4389cc56c7399ffec018fbb |
|
MD5 | c8105b863344181389f2c0f5ad7c3e43 |
|
BLAKE2b-256 | cc1758fa06bb3dcfb6c398fa684c2a3a64cf9cb5f457e60fcf968ff0ac3e4292 |