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.6.12-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea016ef9a4034837d84fd04d3fdc8683069056124725a31040fba251fcd07451 |
|
MD5 | 30b9fec32b1fd5916941e1fef4ff4223 |
|
BLAKE2b-256 | 297b0015848bf35173636cd669e64b10d7ce5e512d370b31ae522926789c17cb |
Hashes for lancedb-0.6.12-cp38-abi3-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a267d1f9253348c7905e1590d6ee389956869cb1b28437c84ea49bc63c34e39 |
|
MD5 | 90d31fa67bd3d7730c473f0c0c440afa |
|
BLAKE2b-256 | f8988bcd7ea00d354f9ebee7e3bd8a5c224b324e653008294273cccc6ef2f4f2 |
Hashes for lancedb-0.6.12-cp38-abi3-manylinux_2_24_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cdaa39219188cb80d416d2c87cbdcac97f3e08e0916036f8e31762576383a9e7 |
|
MD5 | 7e2c41120ca30491ff8c1d8d0d46ae78 |
|
BLAKE2b-256 | ccda2a6871e4ee0adb1b81f717de8720986949fb96c087978a9229be8b7c2919 |
Hashes for lancedb-0.6.12-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d894c340d795e3698ceebb8781fe9071b45d0216df2d44aeab5fe9d6a2de069d |
|
MD5 | 7deb0a97f07f12a99a080c8c6e4c0d18 |
|
BLAKE2b-256 | 971342ad25200c2ab98dc6f887dcac5425b08a06e4b9f632917d8b93424373cd |
Hashes for lancedb-0.6.12-cp38-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8fc289b564ceafdebd9b4fd39e80a44306349257910c909c11adb047da7673ef |
|
MD5 | a1bb227f565a33976c5e903150569a9c |
|
BLAKE2b-256 | 907b8560f70f7c7a333ef1932ba2432df1ce04f0131fa268c324f16ddf4140b4 |
Hashes for lancedb-0.6.12-cp38-abi3-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff9f292817ebbd5d87722adae7d33cc22b3057670cd9936e49da684237910297 |
|
MD5 | 03a84b2814917de09b3126dceed9dbda |
|
BLAKE2b-256 | 94b71c795880b1cf6caff0f46e04194eb8088364cda68c726427c82cee3d3d15 |