vecs
pgvector client
What it is and what it does
vecs is a lightweight Python wrapper around PostgreSQL's pgvector extension, designed to simplify vector storage and retrieval operations. It provides a client interface for creating collections of vectors, upserting records with associated metadata, building indices for fast search, and querying with metadata filtering. The package handles the connection management and SQL generation needed to work with pgvector, abstracting away direct database interaction.
The package is intended for developers building semantic search, similarity matching, or embedding-based applications on top of PostgreSQL. It requires an existing PostgreSQL instance with pgvector already installed—there is no embedded database or managed service bundled with the package itself. Use it when you have vector data to store alongside relational data and want to leverage PostgreSQL's existing infrastructure rather than adopting a separate vector database.
Use it for:
- Build semantic search over documents by storing embeddings and querying with similarity filters.
- Implement recommendation systems by storing user/item embeddings and finding nearest neighbors.
- Add vector similarity matching to existing PostgreSQL applications without migrating to a specialized vector store.
- Query embeddings with metadata constraints, e.g., find similar vectors only from a specific time period or category.
- Prototype vector search workflows before committing to a dedicated vector database.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
vecs is a Python client for storing, indexing, and querying vectors in PostgreSQL using the pgvector extension, enabling semantic search and similarity operations on vector data.
Yes, if you already operate PostgreSQL with pgvector and need a Python interface to vector operations. The permissive MIT license and lack of runtime dependencies make it low-friction to add to an existing stack. However, the aging maintenance status (last commit 2025-04-09, no releases since 2024-12-13) and high install friction (requires external database setup) mean this is best suited for teams with PostgreSQL expertise and a clear need to keep vectors in relational storage. Not a good choice if you need active development support or are evaluating vector databases from scratch.
Install
vecs on PyPI
pip
pip install vecsuv
uv add vecspoetry
poetry add vecsInstalling vecs
Before you install
Installation friction is high: the package itself has no runtime dependencies, but requires an external PostgreSQL database with pgvector extension already configured and accessible. The project shows aging maintenance status with the last commit on 2025-04-09 and no releases since 2024-12-13, though the repository remains active and not archived.
License in practice
MIT license permits commercial and private use with minimal restrictions, making it suitable for most projects. You must include the license text in distributions.
Quickstart
pip install vecs
import vecs
vx = vecs.create_client("postgresql://:@:/<db_name>")
docs = vx.get_or_create_collection(name="docs", dimension=3)
docs.upsert(records=[("id", [0.1, 0.2, 0.3], {"meta": "data"})])
results = docs.query(data=[0.4, 0.5, 0.6], limit=1)
Requires a PostgreSQL database with pgvector extension already installed and running, plus a valid connection string to access it.
Verify before relying
- Whether the aging maintenance status (last commit 2025-04-09, no releases since 2024-12-13) indicates active development or stalled support.
- Performance characteristics and scalability limits for large vector collections.
- Compatibility with recent pgvector versions and PostgreSQL releases.
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | aging — 609 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 114,912/month — #12,274 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: vecs-0.4.5.tar.gz
Tags
More Database packages
psycopg2-binary is a PostgreSQL database…
copyleft · top 1,000 on PyPI
redisPython client library for connecting to and…
permissive · top 1,000 on PyPI
ydbYDB Python SDK is the official client library…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
sqlparsesqlparse tokenizes SQL text into a tree of…
permissive · top 1,000 on PyPI
dbt-adaptersProvides base adapter protocols and shared…
permissive · top 1,000 on PyPI
pgvectorAdds vector storage and similarity search…
permissive · top 1,000 on PyPI
llama-index-vector-stores-postgresIntegrates PostgreSQL with pgvector extension…
permissive · top 15,000 on PyPI
pgvecto-rsProvides Python bindings for PGVecto.rs, a…
permissive · top 15,000 on PyPI
pgserverEmbeds a PostgreSQL server with pgvector…
unclear · top 15,000 on PyPI
upstash-vectorPython client for Upstash Vector, a serverless…
permissive · top 15,000 on PyPI
pg0-embeddedEmbeds a PostgreSQL database directly in Python…
permissive · top 15,000 on PyPI
sqlite-vecsqlite-vec adds vector search capabilities to…
permissive · top 5,000 on PyPI
nano-vectordbA lightweight vector database that stores and…
permissive · top 15,000 on PyPI
apache-airflow-providers-pgvectorIntegrates pgvector operations into Apache…
permissive · top 15,000 on PyPI
nucliadb-utilsProvides utility functions and data structures…
permissive · top 15,000 on PyPI