postgresql-wheel
A Python wheel for Linux containing a complete, self-contained, locally installable PostgreSQL database server.
All servers run as the Python process user in a local path, so this wheel does not require root or sudo privledges. Databases can be initialized in any directory.
Servers can be setup and torn down in test fixtures with no additional outside dependencies.
Currently this wheel only works for most flavors of Linux.
Postgres is compiled in the same "manylinux" environments provided by the cibuildwheel tool using Github Actions and directly archived into the wheel's "package_data".
The wheel can be installed with pip:
$ pip install postgresql-wheel
Postgres binaries in the package can be found in the directory pointed
to by the postgresql.pg_bin global variable. Function wrappers
around all of the postgres binary programs, like initdb and pg_ctl
functions are provided for convenience:
>>> from postgresql import initdb, pg_ctl
>>> initdb('-D testdatabase')
>>> pg_ctl('-D testdatabase -o "-p 5678" -l testdatabase.log start')
>>> import psycopg2
>>> c = psycopg2.connect("postgres://localhost:5678/postgres") # connect with local client
>>> with c.cursor() as q:
>>> q.execute("select version()")
>>> print(q.fetchall())
...
[('PostgreSQL 13.4 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.3.1 20190311 (Red Hat 8.3.1-3), 64-bit',)]
>>> pg_ctl('-D testdatabase stop')
For the purposes of testing, convenience functions are provided for setting up and tearing down databases:
>>> pgdata, con_str = postgresql.setup()
>>> postgresql.psql(f'-h {con_str} -c "select version()"')
>>> postgresql.teardown(pgdata)
There is also a pytest fixture called tmp_postgres that returns a
new connection string to a temporary database local domain socket, and
can be used in a pytest:
>>> from postgresql import tmp_postgres
>>> def test_foo(tmp_postgres):
... postgresql.psql(f'-h {tmp_postgres} -c "select version()"')
Release files for postgresql-wheel 14.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 255.8 kB
Release files / postgresql_wheel-14.1.2-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | postgresql_wheel-14.1.2-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 16.9 kB |
| Tags | Linux glibc 2.17+ x86-64 Linux glibc 2.5+ x86-64 PyPy 3.8 PyPy 3.8 7.3 |
|
SHA-256 checksum How to use checksums |
35183a3e8a01b0efe11018efe283c9877c0599813949e7a784db07e37961d6de
|
|
BLAKE2b-256 checksum How to use checksums |
3f5dd71c7662ae6d93c2e58f964ca3111fb9454663b34aaa155bf80be3d50d08
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
|
Release files / postgresql_wheel-14.1.2-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
| Download URL | postgresql_wheel-14.1.2-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl |
|---|---|
| Size | 16.8 kB |
| Tags | Linux glibc 2.17+ x86-32 Linux glibc 2.5+ x86-32 PyPy 3.8 PyPy 3.8 7.3 |
|
SHA-256 checksum How to use checksums |
f54826490b27528d8f63f8b124323e4d07d7071a2253027cc3d379276c8fc490
|
|
BLAKE2b-256 checksum How to use checksums |
4839609512ca6885f6f3f85bb3f95e15f18df76de80226db0ad201f65056eed9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
|
Release files / postgresql_wheel-14.1.2-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | postgresql_wheel-14.1.2-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 16.7 kB |
| Tags | Linux glibc 2.17+ x86-64 Linux glibc 2.5+ x86-64 PyPy 3.7 PyPy 3.7 7.3 |
|
SHA-256 checksum How to use checksums |
fb1822be9eca6226eb1bc67842303ef88d35cac58d4995d908af7804f8962943
|
|
BLAKE2b-256 checksum How to use checksums |
99cd1aab62a469773165d7bd525f1c754ceaf0c8b95c7180791b882100ad2845
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
|
Release files / postgresql_wheel-14.1.2-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
| Download URL | postgresql_wheel-14.1.2-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl |
|---|---|
| Size | 16.6 kB |
| Tags | Linux glibc 2.17+ x86-32 Linux glibc 2.5+ x86-32 PyPy 3.7 PyPy 3.7 7.3 |
|
SHA-256 checksum How to use checksums |
b95b030a67603f415ccb0116229b76e7df094e5aa3e2eff03449ef0e1389e942
|
|
BLAKE2b-256 checksum How to use checksums |
ba5fbac4207576f13617c944c357846cca2b07386bae226daf715131c04511c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
|
Release files / postgresql_wheel-14.1.2-cp39-cp39-musllinux_1_1_x86_64.whl
| Download URL | postgresql_wheel-14.1.2-cp39-cp39-musllinux_1_1_x86_64.whl |
|---|---|
| Size | 16.7 kB |
| Tags | CPython 3.9 Linux musl 1.1+ x86-64 |
|
SHA-256 checksum How to use checksums |
91ae68f67c40f6fa1b7d9ab65df5b8461737f98a3a5d078b36bd9ac6d1505914
|
|
BLAKE2b-256 checksum How to use checksums |
7df8ea57c5e82af39433d37ceffee4a61b681ab5853647637c418c2db5221f00
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
|
Release files / postgresql_wheel-14.1.2-cp39-cp39-musllinux_1_1_i686.whl
| Download URL | postgresql_wheel-14.1.2-cp39-cp39-musllinux_1_1_i686.whl |
|---|---|
| Size | 16.8 kB |
| Tags | CPython 3.9 Linux musl 1.1+ x86-32 |
|
SHA-256 checksum How to use checksums |
3b2b560449594fad3ea5df4e75919a6f21f8e241269de2bec06cdb9f17f7532e
|
|
BLAKE2b-256 checksum How to use checksums |
3752bacb3646cd2fc1297758dfa59c44cba46b49fb9614fc9a750dd336b0af0f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
|
Release files / postgresql_wheel-14.1.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | postgresql_wheel-14.1.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 14.6 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
50b9158acf1c6237344cb1ab5e9689361a543b92d23b4dcd0becf3ad76f79afc
|
|
BLAKE2b-256 checksum How to use checksums |
bbb4ef65e6cf81211ee2b39a09998a3a0929e9edd5ba46cbb034182f84115c0e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
|
Release files / postgresql_wheel-14.1.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
| Download URL | postgresql_wheel-14.1.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl |
|---|---|
| Size | 14.5 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-32 Linux glibc 2.5+ x86-32 |
|
SHA-256 checksum How to use checksums |
73735b37e955dc6a55c7f7776e2b6b553362e5d5a27f18bfcaf224ff01c1bafc
|
|
BLAKE2b-256 checksum How to use checksums |
e553cdd131a5bf32b5e40cfddc4297eeaf3b54ccfc964f113efaef3a26e74f28
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
|
Release files / postgresql_wheel-14.1.2-cp38-cp38-musllinux_1_1_x86_64.whl
| Download URL | postgresql_wheel-14.1.2-cp38-cp38-musllinux_1_1_x86_64.whl |
|---|---|
| Size | 17.1 kB |
| Tags | CPython 3.8 Linux musl 1.1+ x86-64 |
|
SHA-256 checksum How to use checksums |
a9ad8330176ef61a3fe02f1f24885039bc1882298b7a3ac4978e69a431463be8
|
|
BLAKE2b-256 checksum How to use checksums |
24b3e9ddf48536037a798121f7d7e7998fec3b2819a068b88e6394c7da5c5e07
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
|
Release files / postgresql_wheel-14.1.2-cp38-cp38-musllinux_1_1_i686.whl
| Download URL | postgresql_wheel-14.1.2-cp38-cp38-musllinux_1_1_i686.whl |
|---|---|
| Size | 17.2 kB |
| Tags | CPython 3.8 Linux musl 1.1+ x86-32 |
|
SHA-256 checksum How to use checksums |
7d2874ad9303961f74110002f9e6b5cd3d142e8d0b1e54c00174556c79644817
|
|
BLAKE2b-256 checksum How to use checksums |
11829ff689a2ba13d87c610da6ea3d678a755b07d724c2bd818348e0eaa02dcc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
|
Release files / postgresql_wheel-14.1.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | postgresql_wheel-14.1.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 14.7 kB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
3cd0e0fe41d20cb388be7d3dc2269e3b50fd80caf01e1d24d103aa6c920f466c
|
|
BLAKE2b-256 checksum How to use checksums |
d6ffe61e0450d5d2a686d5598944e6b0fc89d4ac60bd658211be21d1ea9a8b23
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
|
Release files / postgresql_wheel-14.1.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
| Download URL | postgresql_wheel-14.1.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl |
|---|---|
| Size | 14.6 kB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-32 Linux glibc 2.5+ x86-32 |
|
SHA-256 checksum How to use checksums |
a46eeb6e34e67690ff5e0d23ced983839fb29297264bb2e1124be9306cd3e171
|
|
BLAKE2b-256 checksum How to use checksums |
866988858ac4da78449fa07a2acbfc517f0361a17741ac3266ac14bb385949ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
|
Release files / postgresql_wheel-14.1.2-cp37-cp37m-musllinux_1_1_x86_64.whl
| Download URL | postgresql_wheel-14.1.2-cp37-cp37m-musllinux_1_1_x86_64.whl |
|---|---|
| Size | 16.7 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Linux musl 1.1+ x86-64 |
|
SHA-256 checksum How to use checksums |
a628bc9768e73754283574eec59e250f84864ed1d43c6b64af87c6460cd6628b
|
|
BLAKE2b-256 checksum How to use checksums |
a5fd8e8caae4b66623bb09ec505d44beb0f02ff656378e09a86612a2971308f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
|
Release files / postgresql_wheel-14.1.2-cp37-cp37m-musllinux_1_1_i686.whl
| Download URL | postgresql_wheel-14.1.2-cp37-cp37m-musllinux_1_1_i686.whl |
|---|---|
| Size | 16.8 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Linux musl 1.1+ x86-32 |
|
SHA-256 checksum How to use checksums |
efd2fc72ea09a3248618ace0359285e67c9257c8f9b8cd65507568acf6407a70
|
|
BLAKE2b-256 checksum How to use checksums |
4a2fd3747fb86a08e42612ef102cc11a927b66a7071abadd6c4847960e31b987
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
|
Release files / postgresql_wheel-14.1.2-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | postgresql_wheel-14.1.2-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 14.5 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64 Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
f2d365e9f4f4646846d933c3cf4127e134f23c2f4b52c9eef1e9bb05c19c4094
|
|
BLAKE2b-256 checksum How to use checksums |
f5f4c0b1183bb244f6781e33a961b5f5000c72967a3a15dfec105c122a85c1e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
|
Release files / postgresql_wheel-14.1.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
| Download URL | postgresql_wheel-14.1.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl |
|---|---|
| Size | 14.4 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-32 Linux glibc 2.5+ x86-32 |
|
SHA-256 checksum How to use checksums |
67c766070ecc192a9e04ada23bd2396908899c5399acabdc728917fc44a7f4d4
|
|
BLAKE2b-256 checksum How to use checksums |
e786b2080f730342734142eca517f1de7fb752c46662572bf90e974fc2265711
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
|