Skip to main content

Python Version Postrgres Version Linux Supported macOS Supported Windows Supported

PyPI - Downloads

pgserver: pip-installable postgres + pgvector for your python app

pip install pgserver

pgserver lets you build Postgres-backed python apps that remain wholly pip-installable; saving you and your users from needing to understand how to install and setup a postgres server. To achieve this, you need two things which pgserver provides

  • wheels with postgres binaries included
  • convenient initialization and server process management, with defaults that do not interfere with existing postgres installations, and with handling or prevention of many corner cases (being root, port conflicts, etc)

Additionally, this package includes the pgvector extension.

Try it out: Open In Colab

Basic summary:

  • Pip installable binaries: built and tested on Manylinux, MacOS and Windows.
  • No sudo or admin rights needed: Does not require root privileges or sudo.
  • but... can handle root: in some environments your python app runs as root, eg docker, google colab, pgserver handles this case.
  • Simpler initialization: pgserver.get_server(MY_DATA_DIR) method to initialize data and server if needed, so you don't need to understand initdb, pg_ctl, port conflicts.
  • Convenient cleanup: server process cleanup is done for you: when the process using pgserver ends, the server is shutdown, including when multiple independent processes call pgserver.get_server(MY_DATA_DIR) on the same dir (wait for last one). You can blow away your PGDATA dir and start again.
  • For lower-level control, wrappers to all binaries, such as initdb, pg_ctl, psql, pg_config. Includes header files in case you wish to build some other extension and use it against these binaries.
# Example 1: postgres backed application
import pgserver

pgdata = f'{MY_APP_DIR}/pgdata'
db = pgserver.get_server(pgdata)
# server ready for connection.

print(db.psql('create extension vector'))
db_uri = db.get_uri()
# use uri with sqlalchemy / psycopg, etc

# if no other process is using this server, it will be shutdown at exit,
# if other process use same pgadata, server process will be shutdown when all stop.
# Example 2: Testing
import tempfile
import pytest
@pytest.fixture
def tmp_postgres():
    tmp_pg_data = tempfile.mkdtemp()
    with pgserver.get_server(tmp_pg_data, cleanup_mode='delete') as pg:
        yield pg

Postgres binaries in the package can be found in the directory pointed to by the pgserver.pg_bin global variable.

Originally based on https://github.com/michelp/postgresql-wheel,which offers an ubuntu wheel. But with the following differences:

  1. binary wheels for multiple platforms (ubuntu x86, MacOS apple silicon, MacOS x86, Windows)
  2. postgres server management: cross-platform builds, with cross-platfurm startup and cleanup including many edge cases.
  3. includes pgvector extension but excludes postGIS (need to build cross platform, pull requests taken)

Metadata

Release files for pgserver 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for pgserver 0.1.2
File Actions
pgserver-0.1.2-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for pgserver-0.1.2-cp312-cp312-win_amd64.whl
pgserver-0.1.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details for pgserver-0.1.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pgserver-0.1.2-cp312-cp312-macosx_14_0_arm64.whl CPython 3.12 CPython 3.12 macOS 14.0+ ARM64 Details for pgserver-0.1.2-cp312-cp312-macosx_14_0_arm64.whl
pgserver-0.1.2-cp312-cp312-macosx_12_0_x86_64.whl CPython 3.12 CPython 3.12 macOS 12.0+ x86-64 Details for pgserver-0.1.2-cp312-cp312-macosx_12_0_x86_64.whl
pgserver-0.1.2-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for pgserver-0.1.2-cp311-cp311-win_amd64.whl
pgserver-0.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details for pgserver-0.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pgserver-0.1.2-cp311-cp311-macosx_14_0_arm64.whl CPython 3.11 CPython 3.11 macOS 14.0+ ARM64 Details for pgserver-0.1.2-cp311-cp311-macosx_14_0_arm64.whl
pgserver-0.1.2-cp311-cp311-macosx_12_0_x86_64.whl CPython 3.11 CPython 3.11 macOS 12.0+ x86-64 Details for pgserver-0.1.2-cp311-cp311-macosx_12_0_x86_64.whl
pgserver-0.1.2-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details for pgserver-0.1.2-cp310-cp310-win_amd64.whl
pgserver-0.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details for pgserver-0.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pgserver-0.1.2-cp310-cp310-macosx_14_0_arm64.whl CPython 3.10 CPython 3.10 macOS 14.0+ ARM64 Details for pgserver-0.1.2-cp310-cp310-macosx_14_0_arm64.whl
pgserver-0.1.2-cp310-cp310-macosx_12_0_x86_64.whl CPython 3.10 CPython 3.10 macOS 12.0+ x86-64 Details for pgserver-0.1.2-cp310-cp310-macosx_12_0_x86_64.whl
pgserver-0.1.2-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details for pgserver-0.1.2-cp39-cp39-win_amd64.whl
pgserver-0.1.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details for pgserver-0.1.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pgserver-0.1.2-cp39-cp39-macosx_14_0_arm64.whl CPython 3.9 CPython 3.9 macOS 14.0+ ARM64 Details for pgserver-0.1.2-cp39-cp39-macosx_14_0_arm64.whl
pgserver-0.1.2-cp39-cp39-macosx_12_0_x86_64.whl CPython 3.9 CPython 3.9 macOS 12.0+ x86-64 Details for pgserver-0.1.2-cp39-cp39-macosx_12_0_x86_64.whl

Total release size: 176.7 MB

Release files / pgserver-0.1.2-cp312-cp312-win_amd64.whl

Download URL pgserver-0.1.2-cp312-cp312-win_amd64.whl
Size 12.8 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
a99d3be74f7e576a917f0a5159990ea5ee717d356d478bcb4b462043101d8120
BLAKE2b-256 checksum
How to use checksums
104a35f55a5f87e08f98939b292d1fe2d1f68f6d9ab519a4f5edadfbcafd714b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / pgserver-0.1.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pgserver-0.1.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 11.3 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
789fbdffd583b1f8c89a257280e58618d43e7ee1077127659cc33b8ddc16268b
BLAKE2b-256 checksum
How to use checksums
55643b1ba74a08c9ca796a58295e71cc66c2164a62508123f530f5b8a9b9d33b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / pgserver-0.1.2-cp312-cp312-macosx_14_0_arm64.whl

Download URL pgserver-0.1.2-cp312-cp312-macosx_14_0_arm64.whl
Size 9.8 MB
Tags CPython 3.12 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
b49b91353e199a9d7674823b2f0e4b44d9c7df2c79873ffc443bef076bf18034
BLAKE2b-256 checksum
How to use checksums
c1c612785cec2141fb2231ba9c0d1ed1535626a96b734ce81ad73d71deb48b2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / pgserver-0.1.2-cp312-cp312-macosx_12_0_x86_64.whl

Download URL pgserver-0.1.2-cp312-cp312-macosx_12_0_x86_64.whl
Size 10.3 MB
Tags CPython 3.12 macOS 12.0+ x86-64
SHA-256 checksum
How to use checksums
8589cf55d1748ca291a3b15a8f4316faea836014c489cc8fefa36ee7a40f7b5a
BLAKE2b-256 checksum
How to use checksums
e1d06590a0b0abb6945f566ad1a0143dc1e9fffd0248e170f6ab32f22261684a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / pgserver-0.1.2-cp311-cp311-win_amd64.whl

Download URL pgserver-0.1.2-cp311-cp311-win_amd64.whl
Size 12.8 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
c553af72c4481b137c0d9ca7ab6674bba9bdf4435c772b5cc00342d421fafe10
BLAKE2b-256 checksum
How to use checksums
38dbd1a7fff5028c20a7cecca10762b57c50bcf1b579251834a792a53c43136e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / pgserver-0.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pgserver-0.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 11.3 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
c70ef4d0b6b7696f95892add40cabe8504bfb9a88d709493930937cff1a383e5
BLAKE2b-256 checksum
How to use checksums
bea494af43c59d7716672b2a0bcf3e79f5919ded62f90dbfe2792242e4a73e30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / pgserver-0.1.2-cp311-cp311-macosx_14_0_arm64.whl

Download URL pgserver-0.1.2-cp311-cp311-macosx_14_0_arm64.whl
Size 9.8 MB
Tags CPython 3.11 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
de432ece5a4b0cc35003598738084a268533e914d5ecb449af8bb0e74575eb27
BLAKE2b-256 checksum
How to use checksums
5bc4cc031c09401fa93d25a96de01b44c42485dad38f4ce8b7aa52f404697b87
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / pgserver-0.1.2-cp311-cp311-macosx_12_0_x86_64.whl

Download URL pgserver-0.1.2-cp311-cp311-macosx_12_0_x86_64.whl
Size 10.3 MB
Tags CPython 3.11 macOS 12.0+ x86-64
SHA-256 checksum
How to use checksums
84054c23716a121b3ad02ce029fa3fe6b8f9aec6e33163964d82327e73d13497
BLAKE2b-256 checksum
How to use checksums
f8d10aea29913ab797a1e17b31985c36cb8be89c1822887dd43f7a305d9f5417
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / pgserver-0.1.2-cp310-cp310-win_amd64.whl

Download URL pgserver-0.1.2-cp310-cp310-win_amd64.whl
Size 12.8 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
68fbbed09604f8bae0b7a89f7d3113637429b40b95b01de651a58bf68064bf1e
BLAKE2b-256 checksum
How to use checksums
495c68fa908745c38367a6009b1c34087027ae7131a84aca98ed850dac4c71be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / pgserver-0.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pgserver-0.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 11.3 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
f6938b4c8a6d17ceee6743786db8ea66aa27844512299bf86e38d25d28952762
BLAKE2b-256 checksum
How to use checksums
d9a95ef9f85e100148b3eafa6e0bbfdd7f82ff0d64565f32d3cfe061d11ab86d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / pgserver-0.1.2-cp310-cp310-macosx_14_0_arm64.whl

Download URL pgserver-0.1.2-cp310-cp310-macosx_14_0_arm64.whl
Size 9.8 MB
Tags CPython 3.10 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
101dbec84e334f25a699c1a98bf9473a7d643830d2b0f96483d219b7b19992d0
BLAKE2b-256 checksum
How to use checksums
e0118b7b9fd99e3041edf1b909429e135d39516d4afe43936476bb21acdf9d39
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / pgserver-0.1.2-cp310-cp310-macosx_12_0_x86_64.whl

Download URL pgserver-0.1.2-cp310-cp310-macosx_12_0_x86_64.whl
Size 10.3 MB
Tags CPython 3.10 macOS 12.0+ x86-64
SHA-256 checksum
How to use checksums
e84ef56b5a8a33b4b6e721cda2ec41e2c9ca0b6581b736642fcbd7a8cefda594
BLAKE2b-256 checksum
How to use checksums
370c651edc0a27fc6df382c26f8e7701b9b294ae25f15a6f7e1249a3d3fa81d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / pgserver-0.1.2-cp39-cp39-win_amd64.whl

Download URL pgserver-0.1.2-cp39-cp39-win_amd64.whl
Size 12.8 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
07f29d803f960798b2a5a43ac412bee2b40761099253bfcc83bd4ab1a9062a0e
BLAKE2b-256 checksum
How to use checksums
98b7ea998a458e7e71cf504c91c2c996935cbde6d38486665dec8cf12e88500d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / pgserver-0.1.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pgserver-0.1.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 11.3 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
5fb638925f79f550de3184424e3cdb65a7f33677be0dfc7fc3496c89438d5372
BLAKE2b-256 checksum
How to use checksums
c9b32f80898da788c7b94754e392eab67bfc50bbc386e7955f499f82fdff5367
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / pgserver-0.1.2-cp39-cp39-macosx_14_0_arm64.whl

Download URL pgserver-0.1.2-cp39-cp39-macosx_14_0_arm64.whl
Size 9.8 MB
Tags CPython 3.9 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
1ee4b2cee5be9411535a9ad32634b4e3266bbed33b2e4037b68101a57fddbd84
BLAKE2b-256 checksum
How to use checksums
8a4449d1879d6f4fc9095f427c7ec59bcba31af93fc3a74d435d07ce5fe86a79
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / pgserver-0.1.2-cp39-cp39-macosx_12_0_x86_64.whl

Download URL pgserver-0.1.2-cp39-cp39-macosx_12_0_x86_64.whl
Size 10.3 MB
Tags CPython 3.9 macOS 12.0+ x86-64
SHA-256 checksum
How to use checksums
2e628728f9acf79d5310b7ce331841d012262fe39c9b33f69c3a0b617580d8a5
BLAKE2b-256 checksum
How to use checksums
0e289bd5e60c838e9352807a3d504506dc072d1243590723d9a8079bc59ec125
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Security for pgserver 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page