--- id: pgserver version: "0.1.4" license: unclear license_treatment: unclear maintenance: dormant --- # pgserver — Self-contained postgres server for your python applications License: unclear · Maintenance: dormant · Downloads: 364.1K/mo ## 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 above — 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 pip install pgserver uv add pgserver 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_current - Install friction: medium - Maintenance: dormant - Downloads: 364.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags embedded postgres for python, pip-installable postgresql, postgres without system install, pgvector python integration, self-contained database server, postgres in docker containers, vector database for python apps, embedded-database, pgvector, rag-applications [View on SkillFed](https://skillfed.io/packages/pgserver) · [View on PyPI](https://pypi.org/project/pgserver/)