LangGraph Checkpoint Postgres (pg8000)
A PostgreSQL checkpointer implementation for LangGraph using the pg8000 database driver.
Why is this library needed?
The official langgraph-checkpoint-postgres library requires the psycopg database driver. However, certain deployment environments, particularly those using Google Cloud SQL for PostgreSQL with the cloud-sql-python-connector, do not currently support psycopg.
This library serves as a stopgap solution until the Google Cloud SQL Python Connector adds full psycopg support (expected early 2026). It provides the same checkpoint functionality as the official library but uses the pg8000 driver, which is supported by the Cloud SQL Connector.
Installation
# pip
pip install langgraph-checkpoint-postgres-pg8000
# uv
uv add langgraph-checkpoint-postgres-pg8000
# Poetry
poetry add langgraph-checkpoint-postgres-pg8000
Usage
Basic Setup
from langgraph_checkpoint_postgres_pg8000 import Pg8000Saver
from sqlalchemy import create_engine
# Create SQLAlchemy engine
engine = create_engine("postgresql+pg8000://user:password@host/database")
# Initialize checkpointer
checkpointer = Pg8000Saver(engine=engine)
# Use with LangGraph
graph = graph_builder.compile(checkpointer=checkpointer)
Note: Consider using sqlmodel-gcp-postgres to create an SQLAlchemy/SQLModel compatible database engine that may be used with Google Cloud SQL deployments!
Important Notes
Implementation Details:
This library is nearly 100% based on the official langgraph-checkpoint-postgres implementation, with adaptations for pg8000 instead of psycopg. The core logic and SQL queries remain the same.
Migration Path:
Once the Google Cloud SQL Python Connector adds full psycopg support (expected early 2026), you should migrate to the official langgraph-checkpoint-postgres library for long-term support and updates.
Related Projects
- LangGraph - Build stateful, multi-actor applications with LLMs
- langgraph-checkpoint-postgres - Official LangGraph PostgreSQL checkpointer using psycopg
- cloud-sql-python-connector - Python connector for Google Cloud SQL
- sqlmodel-gcp-postgres - SQLModel integration for Google Cloud SQL PostgreSQL
License
MIT License - see LICENSE file for details.
Metadata
Release files for langgraph-checkpoint-postgres-pg8000 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| langgraph_checkpoint_postgres_pg8000-1.0.1.tar.gz | 48.0 kB | Without provenance | Details for langgraph_checkpoint_postgres_pg8000-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| langgraph_checkpoint_postgres_pg8000-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for langgraph_checkpoint_postgres_pg8000-1.0.1-py3-none-any.whl |
Total release size: 58.0 kB
Release files / langgraph_checkpoint_postgres_pg8000-1.0.1.tar.gz
| Download URL | langgraph_checkpoint_postgres_pg8000-1.0.1.tar.gz |
|---|---|
| Size | 48.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
df9b6e60f81594ffa0bbe9a999b4249e0b2ce5395b91f5e3c1f6129ebd34a6e0
|
|
BLAKE2b-256 checksum How to use checksums |
8028fea5f738589e6a18b1891afa6a9ffabfd3f71c80283013855070e9cc359e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.14
|
Release files / langgraph_checkpoint_postgres_pg8000-1.0.1-py3-none-any.whl
| Download URL | langgraph_checkpoint_postgres_pg8000-1.0.1-py3-none-any.whl |
|---|---|
| Size | 10.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1b038439d91a55c38fdb08219c4ffa949a27a2ea7440d777baab00c2de0dc031
|
|
BLAKE2b-256 checksum How to use checksums |
a50a9b3c230d4d632d16906e65ce480e61cc79abd5fc91fa2882192b1154e660
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.14
|
Security for langgraph-checkpoint-postgres-pg8000 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.