skillfed

llama-index-storage-kvstore-postgres

llama-index kvstore postgres integration

llama-index-storage-kvstore-postgres v0.5.0 151.0K downloads/30d#10,946 on PyPI
Permissive license MIT Active released

What it is and what it does

This package is a storage adapter that connects LlamaIndex to PostgreSQL, allowing you to persist key-value data (such as indexed documents and embeddings) in a relational database instead of memory or local files. It bridges LlamaIndex's kvstore abstraction layer with PostgreSQL, using asyncpg for async operations and psycopg2-binary for synchronous access.

Typically used when building LlamaIndex applications that need durable, queryable storage across application restarts or when sharing indexed data across multiple processes. The package handles the schema and connection logic, so you interact with it through LlamaIndex's standard kvstore interface rather than writing SQL directly.

Use it for:

  • Store and retrieve embeddings and indexed documents in PostgreSQL for production LlamaIndex applications
  • Share indexed data across multiple LlamaIndex workers or services via a central PostgreSQL database
  • Persist LlamaIndex caches and metadata durably across application restarts without rebuilding indexes
  • Integrate LlamaIndex with existing PostgreSQL infrastructure in enterprise environments

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides a PostgreSQL-backed key-value store integration for LlamaIndex, enabling persistent storage of indexed data and embeddings using a relational database backend.

Yes, if you are building a LlamaIndex application that requires persistent storage and already use or plan to use PostgreSQL. The low install friction, permissive license, and active maintenance make it a straightforward choice for that use case. Not necessary if you are prototyping with in-memory storage or using a different kvstore backend.

Install

llama-index-storage-kvstore-postgres on PyPI

pip

pip install llama-index-storage-kvstore-postgres

uv

uv add llama-index-storage-kvstore-postgres

poetry

poetry add llama-index-storage-kvstore-postgres

Installing llama-index-storage-kvstore-postgres

Before you install

Low install friction with three straightforward runtime dependencies. Active maintenance status as of March 2026, though repository metadata is not publicly available for independent verification.

License in practice

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

Quickstart

pip install llama-index-storage-kvstore-postgres

from llama_index.storage.kvstore.postgres import PostgresKVStore

kvstore = PostgresKVStore.from_connection_string(
    "postgresql://user:password@localhost/dbname"
)

Requires Python 3.10 or later; PostgreSQL server must be accessible at connection time.

Verify before relying

  • Whether this package is actively maintained by LlamaIndex maintainers or the broader community
  • Performance characteristics and scalability limits for large-scale kvstore operations
  • Whether asyncpg and psycopg2-binary can coexist without conflicts in the same environment

Package facts

License MIT (permissive)
Python support supports the current Python release (<4.0,>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 3 — asyncpg, llama-index-core, psycopg2-binary
Maintenance actively maintained — 155 days since the last release
First released
Downloads 151,031/month — #10,946 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

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

Tags

llama-index postgres storagekvstore postgresql integrationllama-index persistent storagepostgres key-value storellama-index database backend
llama-index-integrationvector-storage

More Database packages

psycopg2-binary

psycopg2-binary is a PostgreSQL database…

copyleft · top 1,000 on PyPI

redis

Python client library for connecting to and…

permissive · top 1,000 on PyPI

ydb

YDB Python SDK is the official client library…

permissive · top 1,000 on PyPI

snowflake-connector-python

Connects Python applications to Snowflake data…

permissive · top 1,000 on PyPI

sqlparse

sqlparse tokenizes SQL text into a tree of…

permissive · top 1,000 on PyPI

dbt-adapters

Provides base adapter protocols and shared…

permissive · top 1,000 on PyPI

llama-index-storage-docstore-postgres

Provides a Postgres-backed document store…

permissive · top 15,000 on PyPI

tentaclio-postgres

Bundles PostgreSQL connectivity and schema…

permissive · top 15,000 on PyPI

llama-index-vector-stores-chroma

Integrates Chroma vector database with…

permissive · top 15,000 on PyPI

llama-index-vector-stores-redis

Integrates Redis as a vector store backend for…

permissive · top 15,000 on PyPI

llama-index-vector-stores-lancedb

Integrates LanceDB as a vector store backend…

permissive · top 15,000 on PyPI

llama-index-vector-stores-qdrant

Integrates Qdrant vector database with…

permissive · top 15,000 on PyPI

llama-index-vector-stores-milvus

Integrates the Milvus vector database with…

permissive · top 15,000 on PyPI

llama-index-embeddings-langchain

Integrates Langchain embedding models with…

permissive · top 15,000 on PyPI

beam-nuggets

Provides Apache Beam transforms for reading and…

permissive · top 15,000 on PyPI

pipestat

Pipestat provides a standard API for reporting,…

permissive · top 15,000 on PyPI