Skip to main content

Python Version Linux Supported macOS Supported Windows Supported

CI 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 so as to 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.

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 some docker containers and google collab, 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)
  • 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.

Based on https://github.com/michelp/postgresql-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 startup and cleanup
  3. includes pgvector extension but excludes postGIS (need to build cross platform, pull requests taken)

Metadata

Release files for pgserver 0.0.9

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.0.9
File Actions
pgserver-0.0.9-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for pgserver-0.0.9-cp311-cp311-win_amd64.whl
pgserver-0.0.9-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.0.9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pgserver-0.0.9-cp311-cp311-macosx_13_0_arm64.whl CPython 3.11 CPython 3.11 macOS 13.0+ ARM64 Details for pgserver-0.0.9-cp311-cp311-macosx_13_0_arm64.whl
pgserver-0.0.9-cp311-cp311-macosx_12_0_x86_64.whl CPython 3.11 CPython 3.11 macOS 12.0+ x86-64 Details for pgserver-0.0.9-cp311-cp311-macosx_12_0_x86_64.whl
pgserver-0.0.9-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details for pgserver-0.0.9-cp310-cp310-win_amd64.whl
pgserver-0.0.9-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.0.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pgserver-0.0.9-cp310-cp310-macosx_13_0_arm64.whl CPython 3.10 CPython 3.10 macOS 13.0+ ARM64 Details for pgserver-0.0.9-cp310-cp310-macosx_13_0_arm64.whl
pgserver-0.0.9-cp310-cp310-macosx_12_0_x86_64.whl CPython 3.10 CPython 3.10 macOS 12.0+ x86-64 Details for pgserver-0.0.9-cp310-cp310-macosx_12_0_x86_64.whl
pgserver-0.0.9-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details for pgserver-0.0.9-cp39-cp39-win_amd64.whl
pgserver-0.0.9-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.0.9-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pgserver-0.0.9-cp39-cp39-macosx_13_0_arm64.whl CPython 3.9 CPython 3.9 macOS 13.0+ ARM64 Details for pgserver-0.0.9-cp39-cp39-macosx_13_0_arm64.whl
pgserver-0.0.9-cp39-cp39-macosx_12_0_x86_64.whl CPython 3.9 CPython 3.9 macOS 12.0+ x86-64 Details for pgserver-0.0.9-cp39-cp39-macosx_12_0_x86_64.whl

Total release size: 175.0 MB

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

Download URL pgserver-0.0.9-cp311-cp311-win_amd64.whl
Size 16.3 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
3d2f93ce3f9d8c3b07e6744b4e310ff0ad91b61c2f15b81355156abdcfb6bc21
BLAKE2b-256 checksum
How to use checksums
30053e44d49ccd6613ff1eae459cd64c4826c3ba89b1258bcc307fba9e7c5386
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.2

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

Download URL pgserver-0.0.9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 15.0 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
22fd3b19b7e190dd7ad14398c249cec6aefd2cc892d0bfeed7aa2500c085fc99
BLAKE2b-256 checksum
How to use checksums
6d4a08ff2186fce076826ad5cee09c97c546dc6cc3b240f9db044da8307bdcd6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.2

Release files / pgserver-0.0.9-cp311-cp311-macosx_13_0_arm64.whl

Download URL pgserver-0.0.9-cp311-cp311-macosx_13_0_arm64.whl
Size 13.1 MB
Tags CPython 3.11 macOS 13.0+ ARM64
SHA-256 checksum
How to use checksums
109f70373ad9c5725f8d76723e4aa1b4c13b477455ec96758cd8986470a48d03
BLAKE2b-256 checksum
How to use checksums
6cffa84c703aaa2fda0530c71780c75a438c8e7faf5ba3a0aa2157ba1f705d08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.2

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

Download URL pgserver-0.0.9-cp311-cp311-macosx_12_0_x86_64.whl
Size 14.0 MB
Tags CPython 3.11 macOS 12.0+ x86-64
SHA-256 checksum
How to use checksums
28f7a8b0876ad01f6de81c49a2513d440e874d326d80c170ded1b658bdcc1a4b
BLAKE2b-256 checksum
How to use checksums
c0f1a7db5c2d258e2fdaffd6f8b0527566eb3794d8b0f49253b74a0b92ea35e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.2

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

Download URL pgserver-0.0.9-cp310-cp310-win_amd64.whl
Size 16.3 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
0f293bc3f92bb87fa6c6dcfab9b7dbd0d9c7ed1c470888788e01ae400d7b4744
BLAKE2b-256 checksum
How to use checksums
44cce3dfc8e81c49f846c9a14bbff605adec5fd184dfb398af42a81e928fb207
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.2

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

Download URL pgserver-0.0.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 15.0 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
239e7d981ce469bcc35acfbb306ff5a4cfb9ca61670a56fb4317ec41b66c119f
BLAKE2b-256 checksum
How to use checksums
955cd43e613db78d6d24c876f39f77cb6e7d4963e281dd2a9da501bfa9c78a24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.2

Release files / pgserver-0.0.9-cp310-cp310-macosx_13_0_arm64.whl

Download URL pgserver-0.0.9-cp310-cp310-macosx_13_0_arm64.whl
Size 13.1 MB
Tags CPython 3.10 macOS 13.0+ ARM64
SHA-256 checksum
How to use checksums
5d8b7d1eac1eaea0ea7a03a5b52f354b90e72340a28417bfc69cf633d12704c0
BLAKE2b-256 checksum
How to use checksums
1cc1d7c674d222cc4e0330690f0dafb4bee0c515e7d440c5280611ed17dba607
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.2

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

Download URL pgserver-0.0.9-cp310-cp310-macosx_12_0_x86_64.whl
Size 14.0 MB
Tags CPython 3.10 macOS 12.0+ x86-64
SHA-256 checksum
How to use checksums
50ba70814884a2518d2d17ec1eeb7016b6d62301b728f46f66417c5a8ed03e6a
BLAKE2b-256 checksum
How to use checksums
91e8986ddc1d6c0da6c23bacb83f1e99023f3d4adf955a52478819792fea869f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.2

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

Download URL pgserver-0.0.9-cp39-cp39-win_amd64.whl
Size 16.3 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
b26e1ea61860926d8aa0b1dd03f8f7d03a6327fd9958e6263996ec9e04a28f43
BLAKE2b-256 checksum
How to use checksums
5ccca90d491dca23f077edaafbcc2fb8217d0f17a2e8204c7eefb15e7e9a5c09
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.2

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

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

Release files / pgserver-0.0.9-cp39-cp39-macosx_13_0_arm64.whl

Download URL pgserver-0.0.9-cp39-cp39-macosx_13_0_arm64.whl
Size 13.1 MB
Tags CPython 3.9 macOS 13.0+ ARM64
SHA-256 checksum
How to use checksums
b1e432cd09939f4fbb88393cf5cb1484072ae7b872b868291d48271637116ca2
BLAKE2b-256 checksum
How to use checksums
3e8fb6017e16dfc3c1f18b709f15f98c69283cabb7dc2823686586a820527bb6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.2

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

Download URL pgserver-0.0.9-cp39-cp39-macosx_12_0_x86_64.whl
Size 14.0 MB
Tags CPython 3.9 macOS 12.0+ x86-64
SHA-256 checksum
How to use checksums
8300c3234ae3489e3e84ce70fc35acf00c652a0661f4af293964873ac2bc624d
BLAKE2b-256 checksum
How to use checksums
d4985a7cb9da62492c4926eaad246ab00ed94e01befbf5c47fd62c8e882182cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.2

Security for pgserver 0.0.9

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