Skip to main content

Python Version Postrgres Version Linux Supported macOS Supported Windows Supported

PyPI - Downloads

pgserver: pip-installable, embedded postgres server + pgvector extension for your python app

pgserver lets you build Postgres-backed python apps with the same convenience afforded by an embedded database (ie, alternatives such as sqlite). If you build your app with pgserver, your app remains wholly pip-installable, saving your users from needing to understand how to setup a postgres server (they simply pip install your app, and postgres is brought in through dependencies), and letting you get started developing quickly: just pip install pgserver and pgserver.get_server(...), as shown in this notebook: Open In Colab

To achieve this, you need two things which pgserver provides

  • python binary wheels for multiple-plaforms with postgres binaries
  • convenience python methods that handle db initialization and server process management, that deals with things that would normally prevent you from running your python app seamlessly on environments like docker containers, a machine you have no root access in, machines with other running postgres servers, google colab, etc. One main goal of the project is robustness around this.

Additionally, this package includes the pgvector postgres extension, useful for storing associated vector data and for vector similarity queries.

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

db = pgserver.get_server(MYPGDATA)
# server ready for connection.

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

# 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()
    pg = pgserver.get_server(tmp_pg_data, cleanup_mode='stop')
    yield pg
    pg.cleanup()

Postgres binaries in the package can be found in the directory pointed to by the pgserver.POSTGRES_BIN_PATH to be used directly.

This project was originally based on , which provides a linux wheel. But adds the following differences:

  1. binary wheels for multiple platforms (ubuntu x86, MacOS apple silicon, MacOS x86, Windows)
  2. postgres python management: cross-platfurm startup and cleanup including many edge cases, runs on colab etc.
  3. includes pgvector extension but currently excludes postGIS

Metadata

Release files for pgserver 0.1.3

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.3
File Actions
pgserver-0.1.3-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for pgserver-0.1.3-cp312-cp312-win_amd64.whl
pgserver-0.1.3-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.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pgserver-0.1.3-cp312-cp312-macosx_14_0_arm64.whl CPython 3.12 CPython 3.12 macOS 14.0+ ARM64 Details for pgserver-0.1.3-cp312-cp312-macosx_14_0_arm64.whl
pgserver-0.1.3-cp312-cp312-macosx_12_0_x86_64.whl CPython 3.12 CPython 3.12 macOS 12.0+ x86-64 Details for pgserver-0.1.3-cp312-cp312-macosx_12_0_x86_64.whl
pgserver-0.1.3-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for pgserver-0.1.3-cp311-cp311-win_amd64.whl
pgserver-0.1.3-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.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pgserver-0.1.3-cp311-cp311-macosx_14_0_arm64.whl CPython 3.11 CPython 3.11 macOS 14.0+ ARM64 Details for pgserver-0.1.3-cp311-cp311-macosx_14_0_arm64.whl
pgserver-0.1.3-cp311-cp311-macosx_12_0_x86_64.whl CPython 3.11 CPython 3.11 macOS 12.0+ x86-64 Details for pgserver-0.1.3-cp311-cp311-macosx_12_0_x86_64.whl
pgserver-0.1.3-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details for pgserver-0.1.3-cp310-cp310-win_amd64.whl
pgserver-0.1.3-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.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pgserver-0.1.3-cp310-cp310-macosx_14_0_arm64.whl CPython 3.10 CPython 3.10 macOS 14.0+ ARM64 Details for pgserver-0.1.3-cp310-cp310-macosx_14_0_arm64.whl
pgserver-0.1.3-cp310-cp310-macosx_12_0_x86_64.whl CPython 3.10 CPython 3.10 macOS 12.0+ x86-64 Details for pgserver-0.1.3-cp310-cp310-macosx_12_0_x86_64.whl
pgserver-0.1.3-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details for pgserver-0.1.3-cp39-cp39-win_amd64.whl
pgserver-0.1.3-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.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pgserver-0.1.3-cp39-cp39-macosx_14_0_arm64.whl CPython 3.9 CPython 3.9 macOS 14.0+ ARM64 Details for pgserver-0.1.3-cp39-cp39-macosx_14_0_arm64.whl
pgserver-0.1.3-cp39-cp39-macosx_12_0_x86_64.whl CPython 3.9 CPython 3.9 macOS 12.0+ x86-64 Details for pgserver-0.1.3-cp39-cp39-macosx_12_0_x86_64.whl

Total release size: 176.7 MB

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

Download URL pgserver-0.1.3-cp312-cp312-win_amd64.whl
Size 12.8 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
205a040d923c123ee99b7ce2af0075618b89978efe1c0027efda28b841d8eae8
BLAKE2b-256 checksum
How to use checksums
8b45235ac88d4483e0b38a8559f0f70491659e6dfb9763f1f42ba58b8e4d3704
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.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pgserver-0.1.3-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
3c5ece5d17b78581cc12d46ef71331b35617c022f3c17b2fc4708060f13dd30d
BLAKE2b-256 checksum
How to use checksums
9bd30a57212181b6afdd55ccf4986203b7d0c517284016ab2e817db113b787a6
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.3-cp312-cp312-macosx_14_0_arm64.whl

Download URL pgserver-0.1.3-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
9d1f4abf1e8b3c3549dd653b0bb24e75346130a7a6cb4d7c705ce8f3a56fd4df
BLAKE2b-256 checksum
How to use checksums
c7c23789b7c1dc5d32012e05c13f85aaa60ca3723bd875dd30720f6bc2a70e4b
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.3-cp312-cp312-macosx_12_0_x86_64.whl

Download URL pgserver-0.1.3-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
d3324f53dcb2a5e6fb43e79f002946f3be6f385294005303d6dd4074b44f4c89
BLAKE2b-256 checksum
How to use checksums
b809c0892416d242eeda5bdc11fbce1801bc1599b4de2122eb13bbd9826da411
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.3-cp311-cp311-win_amd64.whl

Download URL pgserver-0.1.3-cp311-cp311-win_amd64.whl
Size 12.8 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
d07b17602cbad486184512bc25e101aa306b53f5bfee75b2537acfb6a4abe986
BLAKE2b-256 checksum
How to use checksums
9010fc91233e26b54fe5203bd4e20d2e381cead935ac885dfbf33c13ef105e81
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.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pgserver-0.1.3-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
8eca775f47b12ac36aea126deeaa8b5019c7fe5f1e7f43ac016647c4986c2ca0
BLAKE2b-256 checksum
How to use checksums
40226b5e1d3185188ad5a76b293f380ef0b3accd9d30375804c41fb5a76fdb86
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.3-cp311-cp311-macosx_14_0_arm64.whl

Download URL pgserver-0.1.3-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
bb39f35f277fb73ef8a74e4f9311abfbafac5e6c8093c639e7d0ad0b7a310b8d
BLAKE2b-256 checksum
How to use checksums
4d78af03d45ee9c7b6677206239a1e3407519b20b9fe5b6d0abfe98d1cbdbbcf
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.3-cp311-cp311-macosx_12_0_x86_64.whl

Download URL pgserver-0.1.3-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
c0968750a53f950a668685615f571477ea332eeeb56295125ab65f0f401c9c7b
BLAKE2b-256 checksum
How to use checksums
e967be9bb089998fbd9af9ef0fe824cd46deb4c3bdd19259bd2b13b681beb255
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.3-cp310-cp310-win_amd64.whl

Download URL pgserver-0.1.3-cp310-cp310-win_amd64.whl
Size 12.8 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
cd35bb3d7796d017a669c5a934748068983bdfe1dd87d5a5061d2aaebbfdb462
BLAKE2b-256 checksum
How to use checksums
6b67099b94b729fb3442e033182eb93d211cfe24d04581f3095e78d4ae740862
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.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pgserver-0.1.3-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
f738ec686e9395c5857fcb465d482a6199f0c9b9f61f4c013e91d2bab2427f47
BLAKE2b-256 checksum
How to use checksums
955986f8ea7707246e2aa4bbc34490e8b9dac6965aab2bb3f967a4586878749e
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.3-cp310-cp310-macosx_14_0_arm64.whl

Download URL pgserver-0.1.3-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
37b8c9334a30997bfc52f5ae897b774784f00553606baa20dfefb94c4ae106f4
BLAKE2b-256 checksum
How to use checksums
64e760ddd2dd1b7c109250bdd96a849ccb4056f3f4fc1cf65304439c14ec98ab
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.3-cp310-cp310-macosx_12_0_x86_64.whl

Download URL pgserver-0.1.3-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
45e6e74d5ed4cba7802bb1a47aebe89e84be79dd55581a61f956aa7c0ae61078
BLAKE2b-256 checksum
How to use checksums
08ddc9066ac8535659a41b35c5948449d54d2a81e0a4fe6c0add6b3804403eae
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.3-cp39-cp39-win_amd64.whl

Download URL pgserver-0.1.3-cp39-cp39-win_amd64.whl
Size 12.8 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
a5b61ea2989be970356b4fcd65ffdaaba678185c6777deb368f3a75cc4a873b2
BLAKE2b-256 checksum
How to use checksums
6a449acc2d97dc21811a2dce12132f2fb32a3a30c285441f874a44140cde4529
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.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pgserver-0.1.3-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
cbe23c7be3b7b077c198eec6aef193bab25f88a86b9176e80189ffe97f1741d4
BLAKE2b-256 checksum
How to use checksums
aff5403d9ed63dd17c15f7b92e1b195849dd69c68332954e6da65358c323b1ba
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.3-cp39-cp39-macosx_14_0_arm64.whl

Download URL pgserver-0.1.3-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
8f7bfda5628b95625eacfb5d43b9da29277fa0a8158b69435ccb76b49e69e27c
BLAKE2b-256 checksum
How to use checksums
fd1a8e48c0ba3411ec675fa306af8b1e69b000f7ddeb47b573c0c32dacc387a0
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.3-cp39-cp39-macosx_12_0_x86_64.whl

Download URL pgserver-0.1.3-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
ad73781afedb8f1f419b6adf0dc39f2fc5b2193b27a431478150d6cdee2b52bf
BLAKE2b-256 checksum
How to use checksums
5d2c72039668edfc869da0c1bf8b9f3ba364a174fd90300e9f67f4791b8f7bca
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.3

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