skillfed

pgvector

pgvector support for Python

pgvector Permissive license MIT Active 1,513 v0.5.0 released

Install

pgvector on PyPI

pip

pip install pgvector

uv

uv add pgvector

poetry

poetry add pgvector

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 38 days since the last release
Last repo commit
First released
Popularity one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13)
Known vulnerabilities none known (OSV.dev, checked 2026-08-13)

Evidence: pgvector-0.5.0-py3-none-any.whl

About pgvector

from the package's own PyPI description — quoted content, verbatim

pgvector-python

pgvector support for Python

Supports Django, SQLAlchemy, SQLModel, Psycopg 3, Psycopg 2, asyncpg, pg8000, and Peewee

Build Status (image)

Installation

Run:

pip install pgvector

And follow the instructions for your database library:

Or check out some examples:

Read as markdown · JSON record · Source repository · Homepage

AI interpretation — verify before relying

AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page

Provides Python bindings for pgvector, enabling vector storage and similarity search in PostgreSQL through multiple database libraries and ORMs.

Installs cleanly with no runtime dependencies. Actively maintained with recent releases and strong community engagement (1513 stars), last commit 2026-07-06.

MIT license permits commercial and private use with minimal restrictions; suitable for most projects.

Usage

pip install pgvector

from pgvector.django import VectorField, L2Distance

class Item(models.Model):
    embedding = VectorField(dimensions=3)

Item.objects.order_by(L2Distance('embedding', [3, 1, 2]))[:5]

Requires PostgreSQL with pgvector extension and a supported database driver; Python >=3.10.

Verdict: A well-maintained, actively developed library for vector operations in PostgreSQL with broad ORM support. Zero known vulnerabilities, MIT-licensed, and no external Python dependencies make it a low-friction choice for embedding-based applications.

Needs verification

  • Whether pgvector extension must be pre-installed in PostgreSQL or if this package handles that setup
  • Performance characteristics and scalability limits for large vector datasets
  • Compatibility details with specific PostgreSQL versions
postgresql vector search pythonpgvector python clientembedding similarity search postgresvector database pythonsemantic search postgresqlnearest neighbor vector queriesvector storage orm support

Similar packages