Skip to main content

Project for uploading vector embeddings directly to weaviate.

Project description

vectorstores

Utilities for pushing vectors and metadata into a Weaviate instance. The package ships a WeaviateVectorStore implementation plus a simple VectorStore interface you can build on.

Installation

pip install vectorstores

Quickstart

import weaviate
from vectorstores import WeaviateVectorStore

# create a client (configure URL/auth to match your deployment)
client = weaviate.connect_to_local()  # or weaviate.connect_to_wcs(...)

store = WeaviateVectorStore(
    client=client,
    index_name="MyIndex",
    text_key="text",
)

# add data (stores text plus optional metadata; vectors can be provided explicitly)
ids = store.add_vector(
    vectors=["Hello world", "Another sample"],
    metadatas=[{"topic": "greeting"}, {"topic": "example"}],
)
print(ids)

# delete by id
store.delete(ids=[ids[0]])

Notes

  • If you want multi-tenancy, pass use_multi_tenancy=True when constructing the store and provide tenant=... to write/delete calls.
  • If you already have embeddings and want to bypass internal embedding, pass them via vectors and supply matching metadatas/ids.

Development

Create a virtual environment and install dependencies with tests:

python3 -m venv .venv
source .venv/bin/activate
pip install -e .[tests]

Run checks:

ruff check .
mypy .
pytest

Building and uploading to PyPI

  1. Clean old artifacts (optional but recommended):
rm -rf dist build *.egg-info
  1. Build the wheel and sdist:
python -m build
  1. Upload to PyPI with Twine:
twine upload dist/*

Make sure your PyPI credentials are configured (e.g., via ~/.pypirc or environment variables) before running the upload.

Project details


Download files

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

Source Distribution

vectorstores-0.1.2.dev32.tar.gz (16.5 kB view details)

Uploaded Source

Built Distribution

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

vectorstores-0.1.2.dev32-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file vectorstores-0.1.2.dev32.tar.gz.

File metadata

  • Download URL: vectorstores-0.1.2.dev32.tar.gz
  • Upload date:
  • Size: 16.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for vectorstores-0.1.2.dev32.tar.gz
Algorithm Hash digest
SHA256 6312cb71355c694758859116c6e9bed6e02704771a3164df5437b83e3b566b14
MD5 2cef209b5ac9c3d11caef79a2dd84a1e
BLAKE2b-256 56d11e1087a00caf956a1a01cdc14ac89813cfe9ad08e0cd5724e0a5aa77f83d

See more details on using hashes here.

File details

Details for the file vectorstores-0.1.2.dev32-py3-none-any.whl.

File metadata

File hashes

Hashes for vectorstores-0.1.2.dev32-py3-none-any.whl
Algorithm Hash digest
SHA256 e552b37b863fd222086f28ca2431305b75e8ce22c8f7f71c5e39aa4d5a5f7074
MD5 2d32f7e8a496effd564f7b5fa9e5f962
BLAKE2b-256 b7c5b5ec91799fbf2eca87dde071b2c330eabc465c010dcb34e07027f8e2267e

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