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.7

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.7-cp38-abi3-win_amd64.whl (21.4 MB view details)

Uploaded CPython 3.8+ Windows x86-64

lancedb-0.6.7-cp38-abi3-manylinux_2_28_x86_64.whl (22.0 MB view details)

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

lancedb-0.6.7-cp38-abi3-manylinux_2_24_aarch64.whl (20.1 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.24+ ARM64

lancedb-0.6.7-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (22.6 MB view details)

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

lancedb-0.6.7-cp38-abi3-macosx_11_0_arm64.whl (17.8 MB view details)

Uploaded CPython 3.8+ macOS 11.0+ ARM64

lancedb-0.6.7-cp38-abi3-macosx_10_15_x86_64.whl (19.5 MB view details)

Uploaded CPython 3.8+ macOS 10.15+ x86-64

File details

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

File metadata

  • Download URL: lancedb-0.6.7-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 21.4 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.7-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 cde77dda85077cfa07d98c43916ff1e31bda2252696b3b365797a5eb6c22db7a
MD5 42ce57fb0cc57076d8b9ec53ad75d481
BLAKE2b-256 470f285fdb82a8107152b025a2ceb3d47ecea890faf801301c874cab0e637ea3

See more details on using hashes here.

File details

Details for the file lancedb-0.6.7-cp38-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for lancedb-0.6.7-cp38-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 dc3208c3ed6d6ced3697ec5630421388790d9023f67449c96b5704a8037fbd88
MD5 91ceef7d5b6daa131eb37f8a4adabd33
BLAKE2b-256 3a7d7375ac44ccb32161cff863b70cd3274b51fb0dab7eb307153a8b3878872a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.6.7-cp38-abi3-manylinux_2_24_aarch64.whl
Algorithm Hash digest
SHA256 469c96aa4805374e9efdb4600828eeffa4151e26851fe1589626367cb8eee7a8
MD5 b85aa2296b130c5703f940960dd0213e
BLAKE2b-256 b5a3d0cdfbb43ccc15984807c65cc929116f3d3fc6e16186d5c77d10d9c40786

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.6.7-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 542fbd40817191f22f36a3ca97ea3b4bd572802e394516e1a85b2c4f611d4ee4
MD5 6d04ae148ad67c69066c631321c467ee
BLAKE2b-256 eb40c6954123141cf83b17c7ede0345bb54797d9dabacb52f3bb22ec2a040529

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.6.7-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2c67c4d94adc1badc25d23b3e68a57d6198ab07fe78b2a5960ca9fa96818602c
MD5 7c5a1027c19e176a09445cb39d08075a
BLAKE2b-256 c5ab9d26332713d538b8a751715ab6782fcc05ca76e1f467f7ab5ddcf98880f2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lancedb-0.6.7-cp38-abi3-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 c45badda1b7947370bf3ac699232628dde99404574fa092b4bca35e552284910
MD5 3c37c05350b2e97c22e92c9607b1ac29
BLAKE2b-256 6af06feb30d330ea748990e983d07cff94299faf9b712487f5d8be34812d1802

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