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=Truewhen constructing the store and providetenant=...to write/delete calls. - If you already have embeddings and want to bypass internal embedding, pass them via
vectorsand supply matchingmetadatas/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
- Clean old artifacts (optional but recommended):
rm -rf dist build *.egg-info
- Build the wheel and sdist:
python -m build
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vectorstores-0.1.2.dev0-py3-none-any.whl.
File metadata
- Download URL: vectorstores-0.1.2.dev0-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd4dd9d8d5779d8a50ee359164f30c5a534a6a139244bc8b288cf407335cfddb
|
|
| MD5 |
2a19346d06dd5041de8638b78944a5b1
|
|
| BLAKE2b-256 |
7097fbf9c18790b974cecf19e599297a97ed41532582b4696d2a28eac12664cc
|