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_df()
print(results)

Development

Create a virtual environment and activate it:

python -m venv venv
. ./venv/bin/activate

Install the necessary packages:

python -m pip install .

To run the unit tests:

pytest

To run linter and automatically fix all errors:

black .
isort .

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

To run the unit tests:

pytest

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 Distribution

lancedb-0.2.1.tar.gz (31.5 kB view details)

Uploaded Source

Built Distribution

lancedb-0.2.1-py3-none-any.whl (34.9 kB view details)

Uploaded Python 3

File details

Details for the file lancedb-0.2.1.tar.gz.

File metadata

  • Download URL: lancedb-0.2.1.tar.gz
  • Upload date:
  • Size: 31.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for lancedb-0.2.1.tar.gz
Algorithm Hash digest
SHA256 9e3dc0ca17f44c6944755261ab9a3b8a97660930645c414c28428b7cdf755439
MD5 eec730090ea99fd2f676b3def027bd4e
BLAKE2b-256 30406646f25a7d3cb245accef6ee6d0a1d813b743dc0964cf69ed3c1c5a8da4e

See more details on using hashes here.

File details

Details for the file lancedb-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: lancedb-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 34.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for lancedb-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4d368a996f06eb82d9c33589badb2e2c207e701ad6175e04cbcb44cd38ea0f81
MD5 bd69802742133e9be9aeca475f9a89fe
BLAKE2b-256 ddd5ec9842e5ae63a631603ff0dd85c0ea27a93bb7513d46dc41f3a34a4a4381

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