Reference
db.info
Return a one-line summary of the database.
db.info() -> strParameters
Section titled “Parameters”None.
Returns
Section titled “Returns”str: dimension, mode and vector count, plus memory and compression in "pq" mode. repr(db) returns the same text.
Raises
Section titled “Raises”Nothing in normal use.
- The format is for people, not for parsing; it may change.
- Thread safety: releases the GIL and takes a shared lock, so calls from several threads run in parallel; they wait while a write is running. See Threads and processes.
Examples
Section titled “Examples”import srvdb
db = srvdb.create("./vectors", dimension=128)v = [1.0] + [0.0] * 127 # tiny 128-dimension vectorsw = [0.0, 1.0] + [0.0] * 126print(db.info())# SrvDB(dimension=128, mode='hnsw', vectors=0)See also
Section titled “See also”db.count: Return the number of searchable vectors.
Was this page helpful? Tell us in Discussions.