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 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
  • Text search ready: Includes pg_textsearch extension for BM25-based full-text search with ranking

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.

Extensions

pgembed supports optional PostgreSQL extensions as separate packages. Install the extensions you need:

# Base installation (PostgreSQL only)
pip install pgembed

# With specific extensions (separate wheels)
pip install pgembed-pgvector
pip install pgembed-pgvectorscale
pip install pgembed-pgtextsearch

# Multiple extensions
pip install pgembed-pgvector pgembed-pgvectorscale pgembed-pgtextsearch

Available extensions:

  • pgembed-pgvector: Vector similarity search (works on all platforms)
  • pgembed-pgvectorscale: High-performance vector storage (requires Rust, not available on Alpine/Windows)
  • pgembed-pgtextsearch: BM25-based full-text search (requires Rust, not available on Alpine/Windows)

Checking available extensions

import pgembed

# Check which extensions are available
print(pgembed.list_extensions())
# {'pgvector': True, 'pgvectorscale': True, 'pgtextsearch': False, 'pg_duckdb': True}

# Check if a specific extension is available
if pgembed.has_extension('pgvector'):
    # Create the extension
    server.create_extension('vector')

Platform Support

  • pgvector: Works on Linux, macOS (Intel & Apple Silicon), Windows
  • pgvectorscale: Works on Linux, macOS (Intel & Apple Silicon). NOT available on Alpine Linux or Windows (requires Rust)
  • pgtextsearch: Works on Linux, macOS (Intel & Apple Silicon). NOT available on Alpine Linux or Windows (requires Rust)

Building specific extensions

To build only specific extensions:

# Build only pgvector
make pgvector

# Build only pgvectorscale
make pgvectorscale

# Build only pgtextsearch
make pgtextsearch

# Build specific combination
make EXTENSIONS="pgvector pgtextsearch" all

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, pgvectorscale, and pg_textsearch 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.2.0-cp314-cp314-win_amd64.whl (14.4 MB view details)

Uploaded CPython 3.14Windows x86-64

pgembed-0.2.0-cp314-cp314-musllinux_1_2_x86_64.whl (12.7 MB view details)

Uploaded CPython 3.14musllinux: musl 1.2+ x86-64

pgembed-0.2.0-cp314-cp314-musllinux_1_2_aarch64.whl (12.6 MB view details)

Uploaded CPython 3.14musllinux: musl 1.2+ ARM64

pgembed-0.2.0-cp314-cp314-manylinux_2_28_x86_64.whl (68.2 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64

pgembed-0.2.0-cp314-cp314-manylinux_2_28_aarch64.whl (67.9 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ ARM64

pgembed-0.2.0-cp314-cp314-macosx_15_0_arm64.whl (83.0 MB view details)

Uploaded CPython 3.14macOS 15.0+ ARM64

pgembed-0.2.0-cp313-cp313-win_amd64.whl (13.9 MB view details)

Uploaded CPython 3.13Windows x86-64

pgembed-0.2.0-cp313-cp313-musllinux_1_2_x86_64.whl (12.7 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

pgembed-0.2.0-cp313-cp313-musllinux_1_2_aarch64.whl (12.6 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ ARM64

pgembed-0.2.0-cp313-cp313-manylinux_2_28_x86_64.whl (68.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

pgembed-0.2.0-cp313-cp313-manylinux_2_28_aarch64.whl (67.9 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ ARM64

pgembed-0.2.0-cp313-cp313-macosx_15_0_arm64.whl (83.0 MB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

pgembed-0.2.0-cp312-cp312-win_amd64.whl (13.9 MB view details)

Uploaded CPython 3.12Windows x86-64

pgembed-0.2.0-cp312-cp312-musllinux_1_2_x86_64.whl (12.7 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

pgembed-0.2.0-cp312-cp312-musllinux_1_2_aarch64.whl (12.6 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ ARM64

pgembed-0.2.0-cp312-cp312-manylinux_2_28_x86_64.whl (68.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

pgembed-0.2.0-cp312-cp312-manylinux_2_28_aarch64.whl (67.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

pgembed-0.2.0-cp312-cp312-macosx_15_0_arm64.whl (83.0 MB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

File details

Details for the file pgembed-0.2.0-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: pgembed-0.2.0-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 14.4 MB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pgembed-0.2.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 51afbbd7ab657d01dbcfa7e0b0a405add9c0620cde0d9acb724938a2e4904df1
MD5 a50020e510d846cd407b3388576ea63f
BLAKE2b-256 aae87e90fbbd6388c81a6c86040b25c46002ddfc164b4514772688d3028ae0ce

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgembed-0.2.0-cp314-cp314-win_amd64.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.2.0-cp314-cp314-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pgembed-0.2.0-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 5c140a5d9d975690206f5d1af1cc96b8d9764039975d71a2a735cffe833a1811
MD5 3cc264b28ae48be2c566f022d357a321
BLAKE2b-256 7e6fe8d74454325980117a289493b46b408a240cc510ea4dd907f38466c2e362

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgembed-0.2.0-cp314-cp314-musllinux_1_2_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.2.0-cp314-cp314-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for pgembed-0.2.0-cp314-cp314-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 9d5698bb4f119f07020d54dd0b547366c5510d2702aca99668ef81933e56060a
MD5 d04ad6b724e7c94837a62c562c3ec24d
BLAKE2b-256 3ec8f07d822393a5fe9bda40eedd6674b07161c04debdadb681deae56f22adde

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgembed-0.2.0-cp314-cp314-musllinux_1_2_aarch64.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.2.0-cp314-cp314-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pgembed-0.2.0-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 df6a14b6f51ec84fe62391f19fe73065d9453a94ec3c2c0dafd64f16c4376ab5
MD5 1c51415845403ab4d58359d4ce9fd2ff
BLAKE2b-256 e528d133f33271b5021cf05f675fefd673c79d3189e598d4ae89eaf649a8707b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgembed-0.2.0-cp314-cp314-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.2.0-cp314-cp314-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pgembed-0.2.0-cp314-cp314-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 160e187b799a7e69201b8198ee8c2601b4e680c0a18fec45e4258f939512f86d
MD5 713cd41a58e68c0cd6fea81e657b1b80
BLAKE2b-256 ca351b2a756c9bd6789c5df651b68c3f189ec54d1ee91ee49c0b68145d43baed

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgembed-0.2.0-cp314-cp314-manylinux_2_28_aarch64.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.2.0-cp314-cp314-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for pgembed-0.2.0-cp314-cp314-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 f34d3ba29713f96a4f862f2b200c139b678c51e665b0e008d3939920194cdfa3
MD5 70dd0ae27b9599194bd7a3b62076ab90
BLAKE2b-256 2af5e8178e024f3e3d2991af62535e18f6c40cf049393bb2e2d2eaf7b0740e5d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgembed-0.2.0-cp314-cp314-macosx_15_0_arm64.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.2.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: pgembed-0.2.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 13.9 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pgembed-0.2.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 a08bcb72a60ace67fd8396fc858bf5b3beee922c3a640e014de9b46d24fa78fc
MD5 60cb586f23b9462857f84ce2bee7835d
BLAKE2b-256 1ea6422d38992c4de319216a89b28c144e21dd13348b7432dd3e4d585085ac29

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgembed-0.2.0-cp313-cp313-win_amd64.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.2.0-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pgembed-0.2.0-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 0fcd6983b4129579a623af67494663baba41695fdf615bf189d46c41c321fbce
MD5 d40e2cf871858ec5978fcd6cc560215d
BLAKE2b-256 033c60ece3e6a9416fe87d781f352ffbce725c6085cf2c120b521fcd84e36181

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgembed-0.2.0-cp313-cp313-musllinux_1_2_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.2.0-cp313-cp313-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for pgembed-0.2.0-cp313-cp313-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 d4fe27603c223e6ae368ae3be0d5fefb945b143ee916107938f601876028971d
MD5 9024c11ff8bd47917b611d0dbb89d8bc
BLAKE2b-256 5e8904ad37f678f54f88dda044982517bbbe197cff75f50392ea5063c508c3e5

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgembed-0.2.0-cp313-cp313-musllinux_1_2_aarch64.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.2.0-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pgembed-0.2.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c39f8936abcddf728515be587561e0169db0a81267b6c0fb56572e42bcd62f6d
MD5 7577ec873a4537255ffdf486059d53fe
BLAKE2b-256 787c272b8b99221751a0be0805be9882568c3e0afedde06fa605963bff2fd366

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgembed-0.2.0-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.2.0-cp313-cp313-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pgembed-0.2.0-cp313-cp313-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 87e101036cefbea2b7d90577f4ba0652d67115a56c2c2e9a7b5110a852a511c9
MD5 6e07cb1d8775df3a1d916feb23319997
BLAKE2b-256 f8164ce62ce3c63754b48ac9533af86f0b097bc3f1ba899798de216b7fd92d38

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgembed-0.2.0-cp313-cp313-manylinux_2_28_aarch64.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.2.0-cp313-cp313-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for pgembed-0.2.0-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 0aba5e4cb04b06175c7a4d72e0c0e820985d534a2915a5258128de92b6a14d97
MD5 77373e937c29a93a75249cf298f7d878
BLAKE2b-256 65e0c78ec6ad36768652ebd824354d84b680f13e79a98785404904aead5c72ef

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgembed-0.2.0-cp313-cp313-macosx_15_0_arm64.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.2.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: pgembed-0.2.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 13.9 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pgembed-0.2.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 ca22d748b98f83c197923977d409b57babb1692ea04db348c72493cc8e662fdf
MD5 3b9e69017b90ce488726ea6db94039e9
BLAKE2b-256 e4f2714e67e7ab5f3053255ce336c895292959260069f836dab2625db67adfdd

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgembed-0.2.0-cp312-cp312-win_amd64.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.2.0-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pgembed-0.2.0-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 0b6d3dad4a6a7eea25c4d3e140284f3f549676b186e7facd5bbdb6e3e26e418b
MD5 c18f95720b7a01a5523552c79b2d2994
BLAKE2b-256 37c7d21b3552fcd103165d213d4839ad1e0da8fc0762357c4564970172c985f1

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgembed-0.2.0-cp312-cp312-musllinux_1_2_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.2.0-cp312-cp312-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for pgembed-0.2.0-cp312-cp312-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 a2579aad5975e334e6bcb474af2ff6e68b3aad3a20034701f2fb0f4770a5f81d
MD5 30596195f98cd9bd1805bf58e15532b4
BLAKE2b-256 420e917108be10529c6c1611ec173cf9494c246cacdc0e941a20df4a82fddb27

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgembed-0.2.0-cp312-cp312-musllinux_1_2_aarch64.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.2.0-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pgembed-0.2.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 08d509684e902a1773ebcb4c8e61d2a5fc7974f81d017f349574312f74b487e4
MD5 d711c287e44eead4ace0e089d26c7067
BLAKE2b-256 603f4f281cf18c495eb05177103de8c27e2b390b5fe4885548501a7359bca8a8

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgembed-0.2.0-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.

File details

Details for the file pgembed-0.2.0-cp312-cp312-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pgembed-0.2.0-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 564647405608b7cc3455c455b7c91803e078a56be9ba90bbcdabc1ab449ee36f
MD5 072448446b075f3cd3dbd93b2ada81f7
BLAKE2b-256 7006850135e74c728986e7670cf112bd7ccf91d9cc7b30d747ca09823c1098e0

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgembed-0.2.0-cp312-cp312-manylinux_2_28_aarch64.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.2.0-cp312-cp312-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for pgembed-0.2.0-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 a7db0fccfb0aca91b1f4757079cb95c9c0a946609206c8ba91c1e7339da1038a
MD5 cb0f470b0b27ebf3912dcc54641beb34
BLAKE2b-256 f59b705d237d7088bb191e896db4e90c0d671ecaac2d258532d78003a363d0b0

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgembed-0.2.0-cp312-cp312-macosx_15_0_arm64.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