Install & Compatibility
Where this runs
tested against v0.2.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 89.8MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 3.7s · import 0.000s · 86MB
89MB installed
● package 89MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
client
✓ import pgvecto_rs
✗ from pgvecto_rs import client
Connect to PostgreSQL, enable pgvecto.rs extension, create a vector table, insert and query vectors.
from pgvecto_rs import client
conn = client.connect(
host='localhost',
port=5432,
user='postgres',
password=os.environ.get('PGPASSWORD', ''),
database='vectordb'
)
conn.execute("CREATE EXTENSION IF NOT EXISTS vectors")
conn.execute("CREATE TABLE IF NOT EXISTS items (id bigserial PRIMARY KEY, embedding vector(3))")
conn.execute("INSERT INTO items (embedding) VALUES ('[1,2,3]'::vector)")
results = conn.execute("SELECT * FROM items ORDER BY embedding <-> '[3,2,1]'::vector LIMIT 5")
for row in results:
print(row)
Upgrade
Version history
0.2.2latest on PyPI · released Oct 8, 2024
Audit
Dependencies
sqlalchemyoptionalORM support for vector columns