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.dev34.tar.gz (16.6 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.dev34-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vectorstores-0.1.2.dev34.tar.gz
  • Upload date:
  • Size: 16.6 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.dev34.tar.gz
Algorithm Hash digest
SHA256 1d047bdc1341f712f3f677587d8fa0a8f22d5f30fc36898e03acc18c135c457f
MD5 56741c31108fd0e0550b083032cde36b
BLAKE2b-256 850564e304a3f20a7b9a40d4df8befcf57371b9df7a50a725c7363949a7e0e32

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vectorstores-0.1.2.dev34-py3-none-any.whl
Algorithm Hash digest
SHA256 de96bcf6ac27fc1817697364b5a33f54325e7ce958df2c17b969e73030a0ee89
MD5 b2c09d7536be071a4f56e434b636f2af
BLAKE2b-256 fe36d35aff017ace15a4b2af850fde9ca9277f202e7c2f493a482edb0e11dfab

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