Skip to main content

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

This version

0.6.2

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

lancedb-0.6.2-cp38-abi3-win_amd64.whl (20.8 MB view details)

Uploaded CPython 3.8+ Windows x86-64

lancedb-0.6.2-cp38-abi3-manylinux_2_24_aarch64.whl (19.6 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.24+ ARM64

lancedb-0.6.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (21.8 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.17+ x86-64

lancedb-0.6.2-cp38-abi3-macosx_11_0_arm64.whl (17.2 MB view details)

Uploaded CPython 3.8+ macOS 11.0+ ARM64

lancedb-0.6.2-cp38-abi3-macosx_10_15_x86_64.whl (18.6 MB view details)

Uploaded CPython 3.8+ macOS 10.15+ x86-64

File details

Details for the file lancedb-0.6.2-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: lancedb-0.6.2-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 20.8 MB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.8.10

File hashes

Hashes for lancedb-0.6.2-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 0a6a26b2d53ae4a432c57629857449fe70d5aa6979cdf6f9c65f94d10d6b98ee
MD5 183b9e2ea52b6ba92d3bffa0bf77feb6
BLAKE2b-256 2d59f17ac494864594a1b28e093ed8a34726134a940d369d4fe1bbc65da0b3ec

See more details on using hashes here.

File details

Details for the file lancedb-0.6.2-cp38-abi3-manylinux_2_24_aarch64.whl.

File metadata

File hashes

Hashes for lancedb-0.6.2-cp38-abi3-manylinux_2_24_aarch64.whl
Algorithm Hash digest
SHA256 fb4df69d35b809a68c836687cd0db478165da81f5e9259f9b91ba2430e6491c5
MD5 8bad537b70d725bacf5a51c1682c451f
BLAKE2b-256 67ad47f51891d10193cc8886818e8d54d63a4a95299a40e7e1b3d02a03694d44

See more details on using hashes here.

File details

Details for the file lancedb-0.6.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lancedb-0.6.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b32751ef65471cda35be9e1f413d01b6b99290a5f8b057f5d73d149a240c2734
MD5 f834d8c954ffd29429051450d28e81e9
BLAKE2b-256 a95bf97efa3f75ce4aca9aa95936cbd8088e440e3d57424a664f73f2f0b5b058

See more details on using hashes here.

File details

Details for the file lancedb-0.6.2-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for lancedb-0.6.2-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 92a3621ffddb3fbf453088585f39233d2672ce1130ea8a881eeb34c5eef07a0c
MD5 9a5a2b01e4869fafaeb381b259571ed9
BLAKE2b-256 df11396439668907e6c959549dd0f2bc0771fcb1aed119adf46157f226eaf3a8

See more details on using hashes here.

File details

Details for the file lancedb-0.6.2-cp38-abi3-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for lancedb-0.6.2-cp38-abi3-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 b1376b6b082bbefed78a37878df888aac46f331f0768ade3777388e3e65186c1
MD5 5c2a8512cce595f83da0b4ebb054519f
BLAKE2b-256 d6562849121c4961fd225169206d7938910f8e02c3815e5238d37e55b1a2a04e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page