skillfed

pgserver

Self-contained postgres server for your python applications

pgserver v0.1.4 364.1K downloads/30d#7,211 on PyPI100
License unclear DORMANT released

What it is and what it does

pgserver packages PostgreSQL binaries and the pgvector extension into a pip-installable Python package, letting you ship database-backed applications without requiring users to install PostgreSQL separately. It handles cross-platform binary distribution (macOS, Linux, Windows) and provides Python convenience methods to initialize, start, and manage the server lifecycle—including edge cases like running in Docker, on machines without root access, or in Google Colab.

The package wraps low-level PostgreSQL tools (initdb, pg_ctl, psql, pg_config) and manages process cleanup automatically: when your application exits, the server shuts down, and if multiple processes share the same data directory, the server stays alive until the last process ends. This makes it practical for both production applications and test fixtures.

Use it for:

  • Ship a Python application with embedded PostgreSQL so end users need only `pip install` your app, with no separate database setup.
  • Quickly prototype or develop a Postgres-backed application locally without installing system PostgreSQL.
  • Run integration tests in pytest with temporary, isolated PostgreSQL instances that clean up automatically.
  • Deploy Python applications in containerized environments (Docker, Kubernetes) where you want to avoid separate database services.
  • Build RAG (retrieval-augmented generation) applications that use pgvector for vector similarity search without external dependencies.

Worth the install?

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

Embeds a PostgreSQL server with pgvector extension into your Python application as pip-installable binaries, eliminating the need for users to install or manage PostgreSQL separately.

Yes, if you need to ship a Postgres-backed Python app without forcing users to manage a separate database installation, and you can accept the medium install friction of platform-specific wheels. Verify the unclear license first. The dormant maintenance status (no commits since June 2024) means you should assess your tolerance for potential unfixed bugs or compatibility issues with future Python or PostgreSQL versions.

Install

pgserver on PyPI

pip

pip install pgserver

uv

uv add pgserver

poetry

poetry add pgserver

Installing pgserver

Before you install

Medium install friction due to platform-specific compiled wheels (cp39–cp312 across macOS, Linux, Windows). Dormant maintenance status: last release 2024-06-08, no commits since then, though the repository remains active and has 100 stars. Three lightweight runtime dependencies (fasteners, platformdirs, psutil) add minimal overhead.

License in practice

License treatment is unclear—no SPDX identifier or raw license text provided. Verify the actual license before using in proprietary or copyleft-sensitive projects.

Quickstart

import pgserver

db = pgserver.get_server('/path/to/pgdata')
db.psql('create extension vector')
db_uri = db.get_uri()
# Use db_uri with sqlalchemy or psycopg

Requires Python >=3.9. On systems with an existing PostgreSQL server on the default port, pgserver will handle port conflicts, but verify your environment does not have permission restrictions that prevent running a second database instance.

Verify before relying

  • Whether the unclear license permits commercial or proprietary use without restrictions.
  • Performance characteristics and resource overhead compared to system-installed PostgreSQL.
  • Stability and bug-fix commitment given dormant maintenance status since June 2024.

Package facts

License not declared (unclear)
Python support supports the current Python release (>=3.9)
Install friction medium — platform-specific wheel
Runtime dependencies 3 — fasteners, platformdirs, psutil
Maintenance dormant — 797 days since the last release
Last repo commit
First released
Downloads 364,142/month — #7,211 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pgserver-0.1.4-cp310-cp310-macosx_10_9_x86_64.whl; pgserver-0.1.4-cp310-cp310-macosx_11_0_arm64.whl; pgserver-0.1.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; pgserver-0.1.4-cp310-cp310-win_amd64.whl; pgserver-0.1.4-cp311-cp311-macosx_10_9_x86_64.whl; pgserver-0.1.4-cp311-cp311-macosx_11_0_arm64.whl; pgserver-0.1.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; pgserver-0.1.4-cp311-cp311-win_amd64.whl; pgserver-0.1.4-cp312-cp312-macosx_10_9_x86_64.whl; pgserver-0.1.4-cp312-cp312-macosx_11_0_arm64.whl; pgserver-0.1.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; pgserver-0.1.4-cp312-cp312-win_amd64.whl; pgserver-0.1.4-cp39-cp39-macosx_10_9_x86_64.whl; pgserver-0.1.4-cp39-cp39-macosx_11_0_arm64.whl; pgserver-0.1.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; pgserver-0.1.4-cp39-cp39-win_amd64.whl

Keywords: postgresql, pgvector, pgserver, rag

Tags

embedded postgres for pythonpip-installable postgresqlpostgres without system installpgvector python integrationself-contained database serverpostgres in docker containersvector database for python apps
embedded-databasepgvectorrag-applications

More Database packages