Skip to main content

lnclite

PyPI Python License CI Docs

lnclite is a small async LanceDB document store for OpenAI-compatible embeddings. It gives you a compact API for creating a local vector database, adding documents, filtering by tags, and running semantic search.

Installation

pip install lnclite

For local development from this repository:

poetry install --all-groups

Quick Start

import asyncio

from openai import AsyncOpenAI
from openai_embeddings_model import ModelSettings

from lnclite import DocumentCreate, Lnclite, get_openai_embeddings_model


async def main():
    embeddings = get_openai_embeddings_model(
        openai_client=AsyncOpenAI(),
    )

    client = await Lnclite.new(
        lancedb_path="outputs/demo.lance",
        openai_embeddings_model=embeddings,
        model_settings=ModelSettings(dimensions=1536),
        name="Demo",
        description="Local demo documents",
    )

    await client.documents.batch_create(
        [
            DocumentCreate(
                content="A note about async Python clients.",
                tags=["type:note", "topic:python"],
            ),
            DocumentCreate(
                content="A note about vector search and indexing.",
                tags=["type:note", "topic:search"],
            ),
        ]
    )

    await client.create_index()

    results = await client.search(
        "How should I design vector search?",
        tags_any=["topic:search"],
    )

    for result in results.results:
        print(result.document.content)
        print(result.document.tags)
        print(result.distance)

    # Vectors are hidden in returned documents by default.
    results_with_vectors = await client.search(
        "How should I design vector search?",
        include_vector=True,
    )
    print(len(results_with_vectors.results[0].document.vector))


if __name__ == "__main__":
    asyncio.run(main())

Documentation

Full documentation is published at allen2c.github.io/lnclite.

Useful pages:

Examples

Runnable end-to-end examples live in examples/. They cover basic search, tag filtering, directory ingest, managing multiple stores, and an optional downloaded open-dataset demo.

License

MIT

Metadata

Release files for lnclite 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lnclite 0.2.1
File Size Uploaded Provenance Actions
lnclite-0.2.1.tar.gz 17.1 kB Without provenance Details for lnclite-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lnclite 0.2.1
File Interpreter ABI Platform Actions
lnclite-0.2.1-py3-none-any.whl Python 3 none any Details for lnclite-0.2.1-py3-none-any.whl

Total release size: 39.5 kB

Release files / lnclite-0.2.1.tar.gz

Download URL lnclite-0.2.1.tar.gz
Size 17.1 kB
Tags Source
SHA-256 checksum
How to use checksums
146c8a8da197c1af728f5d290c92251dd199de80fc6c1b96dc108da00a795a3f
BLAKE2b-256 checksum
How to use checksums
e73d82a524b62a390447050f84c6a31345e806f4f0c00a005451d0104ce55cb4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.0 CPython/3.12.13 Darwin/25.3.0

Release files / lnclite-0.2.1-py3-none-any.whl

Download URL lnclite-0.2.1-py3-none-any.whl
Size 22.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2f9324956c31fd22e6316e74c8e5bd6800c96e357f6c03fcd5a6cc78f002ce06
BLAKE2b-256 checksum
How to use checksums
72e3bd7ad2b424360c62c4e5d89b90053ce14f9253beaf62380206b60029288f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.0 CPython/3.12.13 Darwin/25.3.0

Security for lnclite 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page