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
File details
Details for the file lancedb-0.17.0b0-cp39-abi3-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: lancedb-0.17.0b0-cp39-abi3-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 27.5 MB
- Tags: CPython 3.9+, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 064134741ad145de0540a666ffd8519f9d5a98b3b8dba60412657f617bd5ea9d |
|
MD5 | 43854c307cd1e69f288f9a625131e1a6 |
|
BLAKE2b-256 | 01573f1ade5c9bb3a8e8daaffb8c268048958a3dda0f4aae0f2f604a89bc3550 |
File details
Details for the file lancedb-0.17.0b0-cp39-abi3-manylinux_2_24_aarch64.whl
.
File metadata
- Download URL: lancedb-0.17.0b0-cp39-abi3-manylinux_2_24_aarch64.whl
- Upload date:
- Size: 26.1 MB
- Tags: CPython 3.9+, manylinux: glibc 2.24+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ffd46159bc36a249a349c5814fe2c454b08b6df3e55a7854fd1246dd5d8c5974 |
|
MD5 | 45992f49a43d874b9fd781eeb56ef129 |
|
BLAKE2b-256 | b238971eb269c9bca441ff4a15e6e331b89513bf8dc2ef6f685c465ebccdf731 |
File details
Details for the file lancedb-0.17.0b0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: lancedb-0.17.0b0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 28.0 MB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c952446813957cb578fbfce9feb8565782c4b0bc4bbe8e04fa0af32e2c7c0531 |
|
MD5 | f4e68ab5a189f001717ebf466cfdcfd7 |
|
BLAKE2b-256 | dcecb1bda2a4649abc5bed7b2febff1856b09e4729198d94813bec3b99110a49 |
File details
Details for the file lancedb-0.17.0b0-cp39-abi3-macosx_11_0_arm64.whl
.
File metadata
- Download URL: lancedb-0.17.0b0-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 22.7 MB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2af7f639b7d13f130d8d755c2d661955be155d700afd55e4d938555723eac474 |
|
MD5 | 2de43845b7fe289dfc5856765343b8af |
|
BLAKE2b-256 | c7451bf152599b242a13a1569c3b7458e973f3617023fa06378de33080fc0880 |
File details
Details for the file lancedb-0.17.0b0-cp39-abi3-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: lancedb-0.17.0b0-cp39-abi3-macosx_10_15_x86_64.whl
- Upload date:
- Size: 24.3 MB
- Tags: CPython 3.9+, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ae20173023ccb3a3d13727e031f60cf02f9d6f9608c8f3cdbda9fdfeecd2880 |
|
MD5 | ae6f8fc3e6f3642fd7f236c6a1aadf8b |
|
BLAKE2b-256 | f1ae4a8950fbb0f89c5b67906f13f6ef0f004c4089abed775ee2c7367f9de023 |