$npx skillfedfor your agent

py-pglite

Python testing library for PGlite - in-memory PostgreSQL for tests

With conditionsPyPI Python ModulesReleased Sep 2025120.2K downloads / moApache-2.0Pure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — py_pglite-0.5.3-py3-none-any.whl
v0.5.3 · released 2025-09-17 · Python >=3.10 · 1 runtime deps: psutil

Yes, if you test Python code that uses PostgreSQL and want to eliminate Docker or server setup overhead. The low install friction, permissive license, and broad client library support make it a straightforward drop-in for pytest suites. Caveat: the package is in beta and aging (no release in 331 days), so verify that PGlite's feature set covers your specific PostgreSQL extensions and that performance meets your test suite's needs before committing to production CI/CD.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.10 or later; asyncpg users must enable TCP mode via PGliteConfig(use_tcp=True).
  • Low friction: pure Python wheel with only psutil as a runtime dependency.
  • Maintenance status is aging—last release was 331 days ago, though the repo remains active with recent commits and moderate community interest (632 stars).

License · maintenance · safety

Apache-2.0 (permissive) — Apache-2.0 permissive license allows use in commercial and open-source projects with minimal restrictions; you must include a copy of the license and note any modifications.

last release 2025-09-17 (331 days) · last repo commit 2025-09-17 · 632 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 120,186 downloads/mo, #12,041 on PyPI

Verify before relying

pip install py-pglite

from py_pglite import PGliteManager

with PGliteManager() as db:
    dsn = db.get_dsn()
    # Use dsn with any PostgreSQL client (SQLAlchemy, psycopg, etc.)
  • Whether PGlite's feature set (JSON, arrays, window functions) covers your specific PostgreSQL extensions or advanced SQL features.
  • Performance characteristics and memory footprint when running large test suites or complex queries.
  • Compatibility with all Django ORM patterns and edge cases beyond the documented socket and backend patterns.
Same gist for agents: .md · .json

What it is and what it does

py-pglite is a Python wrapper around PGlite that spins up an in-memory PostgreSQL instance for testing, eliminating the need for Docker containers, server configuration, or test database management. It works with any PostgreSQL client library—SQLAlchemy, Django ORM, psycopg, asyncpg—and provides pytest fixtures that give each test a fresh, isolated database. The core appeal is speed and simplicity: startup in seconds rather than minutes, and no external dependencies beyond psutil.

The package supports both Unix domain sockets (default, fastest) and TCP sockets (required for asyncpg and cloud environments). It also exposes PGlite extensions like pgvector for vector search testing. Configuration is minimal—most tests work with a single fixture—but advanced users can customize timeouts, logging, cleanup behavior, and socket modes via PGliteConfig.

Use it for

  • Unit testing SQLAlchemy or Django models without spinning up a real PostgreSQL server or Docker container.
  • Testing FastAPI or other web frameworks that depend on a database, with automatic per-test isolation.
  • Validating complex SQL queries, window functions, and JSON operations in CI/CD pipelines where Docker is unavailable or slow.
  • Testing vector similarity search and RAG applications using pgvector extension in isolated test environments.
  • Rapid local development and debugging of database-heavy code without managing a persistent PostgreSQL instance.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you test Python code that uses PostgreSQL and want to eliminate Docker or server setup overhead.

The low install friction, permissive license, and broad client library support make it a straightforward drop-in for pytest suites. Caveat: the package is in beta and aging (no release in 331 days), so verify that PGlite's feature set covers your specific PostgreSQL extensions and that performance meets your test suite's needs before committing to production CI/CD.

Install

py-pglite on PyPI

Before you install

Low friction: pure Python wheel with only psutil as a runtime dependency. Maintenance status is aging—last release was 331 days ago, though the repo remains active with recent commits and moderate community interest (632 stars).

Requires Python 3.10 or later; asyncpg users must enable TCP mode via PGliteConfig(use_tcp=True).

License in practice

Apache-2.0 permissive license allows use in commercial and open-source projects with minimal restrictions; you must include a copy of the license and note any modifications.

Quickstart

pip install py-pglite

from py_pglite import PGliteManager

with PGliteManager() as db:
    dsn = db.get_dsn()
    # Use dsn with any PostgreSQL client (SQLAlchemy, psycopg, etc.)

Verify before relying

  • Whether PGlite's feature set (JSON, arrays, window functions) covers your specific PostgreSQL extensions or advanced SQL features.
  • Performance characteristics and memory footprint when running large test suites or complex queries.
  • Compatibility with all Django ORM patterns and edge cases beyond the documented socket and backend patterns.

Package facts

LicenseApache-2.0 permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
psutil
MaintenanceAging 331 days since the last release
Last repo commit
First released
Downloads120,186 / month, #12,041 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: DatabaseTopic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: Testing

Evidence: py_pglite-0.5.3-py3-none-any.whl

Tags

Capabilities
postgresql testing without dockerin-memory postgres for testspglite python wrapperinstant test database setupsqlalchemy django test fixtureszero-config postgres testingpytest postgresql fixtures
Topics
testing-databasepostgresql-fixturezero-config
PyPI keywords
testingpostgresqlpglitedatabasepytestsqlalchemysqlmodeldjangopytest-django

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “in-memory postgres for tests”

  • py-pglitepy-pglite provides a zero-config PostgreSQL testing environment for…
  • pytest-databasesProvides pytest fixtures that spin up isolated database services in…
  • pgqueuerPgQueuer turns PostgreSQL into a background job queue, letting you…

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also pg0-embedded · PyPgConfig · pytest-pgsql · pytest-postgresql · testcontainers-postgres · testing.postgresql · pgserver · pytest-databases · pg8000 · pytest-mock-resources