pg0 - PostgreSQL for Python
Zero-config PostgreSQL with pgvector. No installation, no Docker, no configuration.
Install
pip install pg0-embedded
Usage
from pg0 import Pg0
# Basic usage
with Pg0() as pg:
print(pg.uri) # postgresql://postgres:postgres@127.0.0.1:5432/postgres
pg.execute("CREATE EXTENSION IF NOT EXISTS vector")
pg.execute("SELECT version()")
# Custom configuration
pg = Pg0(
name="myapp",
port=5433,
username="myuser",
password="mypass",
database="mydb",
config={"shared_buffers": "512MB"}
)
pg.start()
pg.stop()
API
Pg0 Class
| Method | Description |
|---|---|
start() |
Start PostgreSQL, returns InstanceInfo |
stop() |
Stop PostgreSQL |
drop() |
Stop and delete all data |
info() |
Get instance info |
execute(sql) |
Run SQL query |
uri |
Connection URI (property) |
running |
Check if running (property) |
Module Functions
import pg0
pg0.start(name="default", port=5432, ...) # Start instance
pg0.stop(name="default") # Stop instance
pg0.drop(name="default") # Delete instance
pg0.info(name="default") # Get instance info
pg0.list_instances() # List all instances
Getting Connection URI
from pg0 import Pg0
pg = Pg0()
pg.start()
# Using the uri property
print(pg.uri) # postgresql://postgres:postgres@127.0.0.1:5432/postgres
# Or using info()
info = pg.info()
print(info.uri) # postgresql://postgres:postgres@127.0.0.1:5432/postgres
print(info.port) # 5432
print(info.username) # postgres
print(info.database) # postgres
Supported Platforms
Pre-built wheels are available for:
| Platform | Architecture | Wheel Tag |
|---|---|---|
| macOS | Apple Silicon (M1/M2/M3) | macosx_14_0_arm64 |
| Linux | x86_64 (glibc) | manylinux_2_35_x86_64 |
| Linux | ARM64 (glibc) | manylinux_2_35_aarch64 |
| Windows | x64 | win_amd64 |
For other platforms, install from source (requires Rust toolchain):
pip install pg0-embedded --no-binary pg0-embedded
Links
Release files for pg0-embedded 0.15.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pg0_embedded-0.15.2.tar.gz | 20.2 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| pg0_embedded-0.15.2-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| pg0_embedded-0.15.2-py3-none-manylinux_2_35_x86_64.whl | Python 3 | none | Linux glibc 2.35+ x86-64 | Details |
| pg0_embedded-0.15.2-py3-none-manylinux_2_35_aarch64.whl | Python 3 | none | Linux glibc 2.35+ ARM64 | Details |
| pg0_embedded-0.15.2-py3-none-macosx_15_0_x86_64.whl | Python 3 | none | macOS 15.0+ x86-64 | Details |
| pg0_embedded-0.15.2-py3-none-macosx_14_0_arm64.whl | Python 3 | none | macOS 14.0+ ARM64 | Details |
Total release size: 142.1 MB
Release files / pg0_embedded-0.15.2.tar.gz
| Download URL | pg0_embedded-0.15.2.tar.gz |
|---|---|
| Size | 20.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f7181c10aa4db55d61fdc85eca927fb0bd0cb49b1fd5e9898f1606df53757fd4
|
|
BLAKE2b-256 checksum How to use checksums |
d62706c8bafacd1fc8536490c9bb9d6409648741962b3bedf6931fbaf3bfbfbc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 14, 2026.
Transparency logRelease files / pg0_embedded-0.15.2-py3-none-win_amd64.whl
| Download URL | pg0_embedded-0.15.2-py3-none-win_amd64.whl |
|---|---|
| Size | 55.1 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
1b47c938991243d938e28c7e1998c1298637fdb15c54ada6d853e02769d50d3e
|
|
BLAKE2b-256 checksum How to use checksums |
061cb819099b19cbe3687c7c705cf50bd35b7e78512156c99f5faf6c582d3861
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 14, 2026.
Transparency logRelease files / pg0_embedded-0.15.2-py3-none-manylinux_2_35_x86_64.whl
| Download URL | pg0_embedded-0.15.2-py3-none-manylinux_2_35_x86_64.whl |
|---|---|
| Size | 30.4 MB |
| Tags | Linux glibc 2.35+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
c55f43e36de626d4d1cd1ea2f8897e17779c3b5a38cba0107329a149dddfae18
|
|
BLAKE2b-256 checksum How to use checksums |
68a6835812a7c3f02cc86b99f99016e75d221438bdc795e6653e9e0668c09192
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 14, 2026.
Transparency logRelease files / pg0_embedded-0.15.2-py3-none-manylinux_2_35_aarch64.whl
| Download URL | pg0_embedded-0.15.2-py3-none-manylinux_2_35_aarch64.whl |
|---|---|
| Size | 29.8 MB |
| Tags | Linux glibc 2.35+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
aaf89e3c4cfe8affb87910f13dd1e8604596f5f3da7efff5a5eb812bd8b4437c
|
|
BLAKE2b-256 checksum How to use checksums |
6c418a957e45dab89d7e3153566faa5be71d8f57147255b11830ec5777be6e30
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 14, 2026.
Transparency logRelease files / pg0_embedded-0.15.2-py3-none-macosx_15_0_x86_64.whl
| Download URL | pg0_embedded-0.15.2-py3-none-macosx_15_0_x86_64.whl |
|---|---|
| Size | 13.6 MB |
| Tags | Python 3 macOS 15.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
27a4a6bba5bbe536fd948eab121686946ddce5fa7b2a5ecfdbb70ee9db0169bc
|
|
BLAKE2b-256 checksum How to use checksums |
9e688631a1587be4624e251cdd3e1326bdd51b08953eeec730b9036a956fc3b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 14, 2026.
Transparency logRelease files / pg0_embedded-0.15.2-py3-none-macosx_14_0_arm64.whl
| Download URL | pg0_embedded-0.15.2-py3-none-macosx_14_0_arm64.whl |
|---|---|
| Size | 13.0 MB |
| Tags | Python 3 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
cbfb988ef6ad39009835f7d1f734b6df5bc05db944050f932e08465bcc6bfe2d
|
|
BLAKE2b-256 checksum How to use checksums |
1bb4d64bd24546b69ff3820cb8fb5771113a69ea5dfffa9aa4e0831a25425d46
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 14, 2026.
Transparency log