Skip to main content

Self-contained postgres server for your python applications

Project description

Python Version Postgres Version

Linux Support macOS Apple Silicon Support >=11 macOS Intel Support => 10.0 Windows Support >= 2022

License PyPI Package PyPI - Downloads

pgembed: Embedded PostgreSQL for Agents

pgembed makes it easy to add a full-featured PostgreSQL database to your Python application—no server setup required. Your users simply run pip install yourapp, and PostgreSQL comes bundled automatically.

Think of it like SQLite, but with the power of PostgreSQL. Just pip install pgembed, call pgembed.get_server(...), and you're ready to go.

Open In Colab

What pgembed gives you

  • Pip-installable PostgreSQL binaries: Pre-built wheels for Linux, macOS (Apple Silicon & Intel), and Windows
  • No admin rights needed: Runs without sudo or root access
  • Handles edge cases: Works in Docker containers, Google Colab, and environments with multiple PostgreSQL installations
  • Simple initialization: pgembed.get_server(MY_DATA_DIR) handles initdb, port management, and process cleanup automatically
  • Vector search ready: Includes pgvector and pgvectorscale extensions for vector similarity queries and high-performance vector storage

Quick start

import pgembed

# Initialize and start the server
pgembed.get_server("/path/to/my/data/dir")

# Connect and use like any PostgreSQL database
# ... your database code here
# Look in examples/*.py for more complete examples that could be run via uv

PostgreSQL binaries are available at pgembed.POSTGRES_BIN_PATH if you need direct access to tools like initdb, pg_ctl, psql, or pg_config.

History

pgembed is a fork of pgserver, which was inspired by postgresql-wheel. While those projects focused primarily on Linux wheels, pgembed extends the approach with:

  • Multi-platform support (Linux, macOS, Windows)
  • Robust process management and cleanup
  • Built-in pgvector and pgvectorscale extensions

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pgembed-0.1.6-cp313-cp313-manylinux_2_28_x86_64.whl (39.0 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

pgembed-0.1.6-cp312-cp312-manylinux_2_28_x86_64.whl (39.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

File details

Details for the file pgembed-0.1.6-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pgembed-0.1.6-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 98e52f6db6aef28a87c515e34efea604550a5fb5fd9a4c86d848a55e43f83c6e
MD5 997cd2c563617dd7dd50039f43e2c115
BLAKE2b-256 a607b80570c10158c13c249a8106470584740b67a1ab5b93cfdfbf147b72d746

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgembed-0.1.6-cp313-cp313-manylinux_2_28_x86_64.whl:

Publisher: build-and-test.yml on Ladybug-Memory/pgembed

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pgembed-0.1.6-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pgembed-0.1.6-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 94b1ef1624006f19d14d58a31ef126435368b98d4a6ba61c3bbe668374c52c48
MD5 e5c6f65cef175fa42d93a86fb999c7a6
BLAKE2b-256 04baf7ecb79b04c66547fdb42c425fd03990047aff87ad1b27ec8ba801a08d98

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgembed-0.1.6-cp312-cp312-manylinux_2_28_x86_64.whl:

Publisher: build-and-test.yml on Ladybug-Memory/pgembed

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page