Skip to main content

A DuckDB based Vector Store

Project description

Swarmauri Logo

PyPI - Downloads PyPI - Python Version PyPI - License PyPI - Version


DuckDB Vector Store

A vector store implementation using DuckDB as the backend for efficient document storage and similarity search.

Installation

pip install swarmauri_vectorstore_duckdb

Usage

from swarmauri.vector_stores.DuckDBVectorStore import DuckDBVectorStore
from swarmauri.documents.Document import Document

# Initialize vector store
vector_store = DuckDBVectorStore(database_name="my_vectors.db")
vector_store.connect()

# Add documents
doc = Document(
    id="doc1",
    content="The quick brown fox jumps over the lazy dog",
    metadata={"type": "example"}
)
vector_store.add_document(doc)

# Retrieve similar documents
results = vector_store.retrieve("fox jumping", top_k=2)

# Clean up
vector_store.disconnect()

Want to help?

If you want to contribute to swarmauri-sdk, read up on our guidelines for contributing that will help you get started.

Project details


Release history Release notifications | RSS feed

This version

0.7.0

Download files

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

Source Distribution

swarmauri_vectorstore_duckdb-0.7.0.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

swarmauri_vectorstore_duckdb-0.7.0-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file swarmauri_vectorstore_duckdb-0.7.0.tar.gz.

File metadata

File hashes

Hashes for swarmauri_vectorstore_duckdb-0.7.0.tar.gz
Algorithm Hash digest
SHA256 b5af3c27332327db5531c638cc076b3a6e9207a85f755cdc5bcde656ff246f8d
MD5 018067c319cc41827b31f10f5f153d3b
BLAKE2b-256 7343eb848f2ac93b6276fc236216fed4c447ee8ac1ad39a279e79d2ed044a7c1

See more details on using hashes here.

File details

Details for the file swarmauri_vectorstore_duckdb-0.7.0-py3-none-any.whl.

File metadata

File hashes

Hashes for swarmauri_vectorstore_duckdb-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 57b4391e7934d2eb1a6c9c34b6e6d8f95bcb7c178ceaf47c66d2922838528f93
MD5 ef2414baa375dbc6dc751d9314e1b95f
BLAKE2b-256 6af00e95e845753bc7cfe035bcd2d86646159587f4d50a4327219ce92741cbe1

See more details on using hashes here.

Supported by

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