Skip to content

sqlite-vec-client: Pythonic wrapper for vector storage and similarity searchΒ #247

@atasoglu

Description

@atasoglu

Hi! πŸ‘‹

I've built sqlite-vec-client, a lightweight Python library that wraps sqlite-vec with a simple, Pythonic API for vector storage and similarity search.

πŸ”— Links

✨ Key Features

  • Simple CRUD operations with automatic sync between base table and vec0 index
  • Similarity search with filtering and pagination
  • Bulk operations and transaction support
  • Text + JSON metadata + float32 embeddings in one table

πŸ“¦ Quick Example

from sqlite_vec_client import SQLiteVecClient

client = SQLiteVecClient(table="docs", db_path=":memory:")
client.create_table(dim=384, distance="cosine")

# Add texts with embeddings
rowids = client.add(texts=["hello world"], embeddings=[[0.1, 0.2, ...]])

# Similarity search
hits = client.similarity_search(embedding=[0.1, 0.2, ...], top_k=5)

Perfect for developers who want to use sqlite-vec without writing raw SQL, with built-in safety (SQL injection prevention, input validation) and convenience features (bulk ops, transactions, logging).

Would love to hear feedback from the community! Feel free to try it out and open issues/PRs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions