Skip to main content

Full PostgreSQL server + client tools (pg_dump, psql, ...) as pip-installable wheels. No compilation, no system packages, no root.

Project description

celerp-postgres

PostgreSQL, pip installable. A full PostgreSQL distribution — the server and the client tools — delivered as a platform wheel. No apt/brew/installer, no Docker, no root, no compilation.

pip install celerp-postgres

That's the whole setup. You get unmodified PostgreSQL binaries on disk and a three-function API that tells you where they are. What you run with them is up to you.

Quickstart

Spin up a real PostgreSQL 17 database in a few lines — no drivers required beyond whatever you already use to talk to Postgres:

import subprocess, tempfile
from celerp_postgres import tool

data = tempfile.mkdtemp()

# One-time cluster init (no password prompts: local trust auth; libc collation
# keeps the package fully self-contained — ICU remains available per-collation)
subprocess.run([tool("initdb"), "-D", data, "-U", "postgres", "-A", "trust",
                "--locale-provider=libc"], check=True)

# Start on localhost:54321
subprocess.run([tool("pg_ctl"), "-D", data, "-w",
                "-o", "-c listen_addresses=127.0.0.1 -c port=54321",
                "-l", f"{data}/log", "start"], check=True)

# ... connect with psycopg / asyncpg / SQLAlchemy / anything:
#     postgresql://postgres@127.0.0.1:54321/postgres

subprocess.run([tool("pg_ctl"), "-D", data, "-w", "stop"], check=True)

On Linux/macOS you can skip TCP entirely and listen on a unix socket (-c listen_addresses='' -c unix_socket_directories=<dir>), which keeps the database invisible to the network.

What's in the box

Every wheel contains the complete distribution for its platform:

Server postgres, initdb, pg_ctl
Client tools psql, pg_dump, pg_restore, pg_basebackup, createdb, …
Runtime lib/ (shared libraries), share/ (initdb templates, timezone data)
Licenses PostgreSQL COPYRIGHT + upstream LICENSE, inside the package

C headers (include/) are not shipped — this package runs PostgreSQL; it isn't a build-against-libpq SDK.

Supported platforms

Wheel Platform
manylinux_2_34_x86_64 / _aarch64 Linux (glibc 2.34+)
musllinux_1_2_x86_64 / _aarch64 Alpine / musl Linux
macosx_26_0_x86_64, macosx_26_0_arm64 macOS 26+ (upstream binaries target current macOS)
win_amd64 Windows x64

Any CPython ≥ 3.9. Wheels only — there is deliberately no sdist, because a source install could not contain the binaries and would silently produce a broken package.

Every wheel is fully self-contained: the required shared libraries (openssl, icu, libxml2, compression codecs, …) ship inside the package, so it works on minimal images like python:slim and python:alpine with no system packages. A few niche server extensions that would drag in huge or host-specific dependencies (plpython3u, JIT/llvmjit, uuid-ossp, xml2) are not included.

API

Three symbols; that's the entire surface:

from celerp_postgres import POSTGRES_VERSION, bin_dir, tool, icu_data_dir

POSTGRES_VERSION   # "17.10.0" — the bundled PostgreSQL version (== package version)
bin_dir()          # ".../site-packages/celerp_postgres/pginstall/bin"
tool("pg_dump")    # full path to a tool; raises FileNotFoundError if absent
icu_data_dir()     # musl wheels only: set ICU_DATA to this when spawning the
                   # server (Alpine's ICU reads data from an external file);
                   # None on every other platform

No lifecycle magic, no hidden daemons, no atexit hooks. You own the process — which is exactly what makes this composable with whatever supervisor, test fixture, or app framework you already have.

Why you'd want this

  • Test suites that need a real PostgreSQL without Docker, CI services, or a system install — pip install, boot per-session, throw away.
  • Local-first / desktop apps that embed a private database next to the app's data directory instead of asking users to install a server.
  • CLI tools and data scripts that need pg_dump/pg_restore/psql at a known, version-pinned path regardless of what the host has on PATH.
  • Air-gapped and locked-down environments — everything arrives through pip's normal, hash-verifiable channel; nothing is downloaded at runtime.
  • Teaching, notebooks, demos — a real database with zero setup instructions.

Versioning & updates

The package version is the PostgreSQL version (17.10.0 ships PostgreSQL 17.10). New PostgreSQL point releases are published as new package versions shortly after the upstream release train; pin >=17.10,<18 to receive security patches within the major you initialized your data directory with. Repackaging-only fixes use post releases (17.10.0.post1). PostgreSQL major upgrades change the on-disk pgdata format — moving 17 → 18 requires a pg_dump/pg_restore migration, as with any PostgreSQL installation.

How it's built (and why you can trust it)

Wheels repackage the excellent theseus-rs/postgresql-binaries release archives — the same binary source used across the Rust embedded-postgres ecosystem. Every archive's sha256 is pinned in this repository and verified at build time (never trusted from a live sidecar), the binaries are shipped unmodified, and every release is gated on CI that boots a real cluster on each platform and runs a pg_dumppg_restore roundtrip before anything reaches PyPI. Publishing uses PyPI trusted publishing (OIDC) — no long-lived credentials exist.

License

  • Package code (accessor module + build tooling): MIT.
  • PostgreSQL binaries: PostgreSQL License — permissive, OSI-approved; the COPYRIGHT and upstream LICENSE notices ship inside the package at celerp_postgres/pginstall/.

Credits: the PostgreSQL Global Development Group, and theseus-rs for the portable builds.


Maintained by the Celerp team.

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.

celerp_postgres-17.10.0-py3-none-win_amd64.whl (48.1 MB view details)

Uploaded Python 3Windows x86-64

celerp_postgres-17.10.0-py3-none-musllinux_1_2_x86_64.whl (19.1 MB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

celerp_postgres-17.10.0-py3-none-musllinux_1_2_aarch64.whl (19.4 MB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

celerp_postgres-17.10.0-py3-none-manylinux_2_34_x86_64.whl (16.1 MB view details)

Uploaded Python 3manylinux: glibc 2.34+ x86-64

celerp_postgres-17.10.0-py3-none-manylinux_2_34_aarch64.whl (15.6 MB view details)

Uploaded Python 3manylinux: glibc 2.34+ ARM64

celerp_postgres-17.10.0-py3-none-macosx_26_0_x86_64.whl (12.0 MB view details)

Uploaded Python 3macOS 26.0+ x86-64

celerp_postgres-17.10.0-py3-none-macosx_26_0_arm64.whl (11.6 MB view details)

Uploaded Python 3macOS 26.0+ ARM64

File details

Details for the file celerp_postgres-17.10.0-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for celerp_postgres-17.10.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 c05f6874dd98f7fcb3e9e44ac3fa68ce375ca634f4010168bf20f65816f178a5
MD5 8b120cdb48041cfbbc6a581b59d88094
BLAKE2b-256 1996bcb9055445f641cb54fe589a7911fa79ca71e8504d959a5256b8687eb5a6

See more details on using hashes here.

Provenance

The following attestation bundles were made for celerp_postgres-17.10.0-py3-none-win_amd64.whl:

Publisher: publish.yml on celerp/celerp-postgres

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

File details

Details for the file celerp_postgres-17.10.0-py3-none-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for celerp_postgres-17.10.0-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 865d2e25161c604ed082b020d866b43e749085fc9c3eaa47a26331c026c9099a
MD5 b0e0066062bd667a20a7d22ad2ac59ef
BLAKE2b-256 550b111b5b15b4f635216f8e3621c1cf63ab1710260d33d4bf4ef26ea59372c2

See more details on using hashes here.

Provenance

The following attestation bundles were made for celerp_postgres-17.10.0-py3-none-musllinux_1_2_x86_64.whl:

Publisher: publish.yml on celerp/celerp-postgres

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

File details

Details for the file celerp_postgres-17.10.0-py3-none-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for celerp_postgres-17.10.0-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 a5508bd87090901552698c88e506bf2489da897a96871d2300639a7baed5f0a3
MD5 93fa077c1656e455493532c653129f51
BLAKE2b-256 e20c1ef05cc8ea764c2310fa53fd26e3e981b7f73b8540c1ff506f61d4ca90dd

See more details on using hashes here.

Provenance

The following attestation bundles were made for celerp_postgres-17.10.0-py3-none-musllinux_1_2_aarch64.whl:

Publisher: publish.yml on celerp/celerp-postgres

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

File details

Details for the file celerp_postgres-17.10.0-py3-none-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for celerp_postgres-17.10.0-py3-none-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 ece9e687eb907cca6a384823be2aeb40d357ce1680d1e4fdeddfdd06aacca80d
MD5 2840654b177053a16c1249fc2cdb9171
BLAKE2b-256 694359e625a9589efedbc6edc30b98b1f24ddb5ffd88416f1258b297633d0480

See more details on using hashes here.

Provenance

The following attestation bundles were made for celerp_postgres-17.10.0-py3-none-manylinux_2_34_x86_64.whl:

Publisher: publish.yml on celerp/celerp-postgres

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

File details

Details for the file celerp_postgres-17.10.0-py3-none-manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for celerp_postgres-17.10.0-py3-none-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 08d60bd8e12a985335d271ddda12bba12d875298edb5078afc00e99fe75ec142
MD5 91d077459028d351860cf58c024052cd
BLAKE2b-256 0bb5ce8fd22f16b3e40ba3b97671c1b90c52765268fc606d860bf68e740d203b

See more details on using hashes here.

Provenance

The following attestation bundles were made for celerp_postgres-17.10.0-py3-none-manylinux_2_34_aarch64.whl:

Publisher: publish.yml on celerp/celerp-postgres

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

File details

Details for the file celerp_postgres-17.10.0-py3-none-macosx_26_0_x86_64.whl.

File metadata

File hashes

Hashes for celerp_postgres-17.10.0-py3-none-macosx_26_0_x86_64.whl
Algorithm Hash digest
SHA256 b03eb28bbbcc6db820171298e2f94b952f4b9b082a43d1125fefe5eb44013435
MD5 0077eabbf4a4f12fbba03594974ba455
BLAKE2b-256 384d0225dcec4dbe7de9ea1f01edfac9fb4541c4b5d1d7366a887ccf5d6be71f

See more details on using hashes here.

Provenance

The following attestation bundles were made for celerp_postgres-17.10.0-py3-none-macosx_26_0_x86_64.whl:

Publisher: publish.yml on celerp/celerp-postgres

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

File details

Details for the file celerp_postgres-17.10.0-py3-none-macosx_26_0_arm64.whl.

File metadata

File hashes

Hashes for celerp_postgres-17.10.0-py3-none-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 5d974fa04ec3b74efdebf8080b26450167bc212c84d41836320deb4cdda33307
MD5 f14bb274db800f40f4e6359b12dd47f3
BLAKE2b-256 b5d01c33aae5aef493f5244f0f4fe60b090ab3adb9b73bf359bd00405b862daf

See more details on using hashes here.

Provenance

The following attestation bundles were made for celerp_postgres-17.10.0-py3-none-macosx_26_0_arm64.whl:

Publisher: publish.yml on celerp/celerp-postgres

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