Skip to main content

pg0 - PostgreSQL for Python

PyPI

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pg0_embedded-0.15.0.tar.gz (19.9 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pg0_embedded-0.15.0-py3-none-win_amd64.whl (55.1 MB view details)

Uploaded Python 3Windows x86-64

pg0_embedded-0.15.0-py3-none-manylinux_2_35_x86_64.whl (30.4 MB view details)

Uploaded Python 3manylinux: glibc 2.35+ x86-64

pg0_embedded-0.15.0-py3-none-manylinux_2_35_aarch64.whl (29.8 MB view details)

Uploaded Python 3manylinux: glibc 2.35+ ARM64

pg0_embedded-0.15.0-py3-none-macosx_15_0_x86_64.whl (13.7 MB view details)

Uploaded Python 3macOS 15.0+ x86-64

pg0_embedded-0.15.0-py3-none-macosx_14_0_arm64.whl (13.1 MB view details)

Uploaded Python 3macOS 14.0+ ARM64

File details

Details for the file pg0_embedded-0.15.0.tar.gz.

File metadata

  • Download URL: pg0_embedded-0.15.0.tar.gz
  • Upload date:
  • Size: 19.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for pg0_embedded-0.15.0.tar.gz
Algorithm Hash digest
SHA256 9a4ef5ea6db0b6f600b07ea9517fccb5f35b4dd331ac21aa500db86be1c6cfff
MD5 276ddcae1f3c147118dfdbbcf205dcab
BLAKE2b-256 8e35a276584c2a146923ed43891316d4f913237bfa646918e58b4bf9683fa1b3

See more details on using hashes here.

Provenance

The following attestation bundles were made for pg0_embedded-0.15.0.tar.gz:

Publisher: release-cli.yml on vectorize-io/pg0

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pg0_embedded-0.15.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: pg0_embedded-0.15.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 55.1 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for pg0_embedded-0.15.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 f97dfb420cef7700d2f51fccca37dea424c4c5d88b8bc1b7e26e7e42a1adddc2
MD5 0319b9941278f1b69794c8d6511a7a17
BLAKE2b-256 e230b0a66fec3572263fc2e230772e459ba2e38aa611057660fe876141c43998

See more details on using hashes here.

Provenance

The following attestation bundles were made for pg0_embedded-0.15.0-py3-none-win_amd64.whl:

Publisher: release-cli.yml on vectorize-io/pg0

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pg0_embedded-0.15.0-py3-none-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for pg0_embedded-0.15.0-py3-none-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 7a0ff8b679d82933f6538d1480cfc379be8f17db0f0f98064cb3cb005f36e3c2
MD5 2d99c4913caaabcbc270f3adb94c9320
BLAKE2b-256 d7b01f18c8418cdd3cfc55d5fd97e0d9277459451903100f62e0a8374fee8315

See more details on using hashes here.

Provenance

The following attestation bundles were made for pg0_embedded-0.15.0-py3-none-manylinux_2_35_x86_64.whl:

Publisher: release-cli.yml on vectorize-io/pg0

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pg0_embedded-0.15.0-py3-none-manylinux_2_35_aarch64.whl.

File metadata

File hashes

Hashes for pg0_embedded-0.15.0-py3-none-manylinux_2_35_aarch64.whl
Algorithm Hash digest
SHA256 64d9aa40ee36990967905776d1be7796100e2a3c2eb5e0c3f64912918fa05306
MD5 b5d265d814903ca710a16641cb14392c
BLAKE2b-256 4fae77d65fe7a573e18685c8a30c1ba5371edfb608b199997bfdb3c314c87f12

See more details on using hashes here.

Provenance

The following attestation bundles were made for pg0_embedded-0.15.0-py3-none-manylinux_2_35_aarch64.whl:

Publisher: release-cli.yml on vectorize-io/pg0

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pg0_embedded-0.15.0-py3-none-macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for pg0_embedded-0.15.0-py3-none-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 db9910f66f854b34e0797136f6cd9fd0916ef6394a6b3485788258cff3f270a9
MD5 ad7182d206fec8f4fa6a56d52f4f0107
BLAKE2b-256 7cba5ad9ba2ce0781e24111f2eb2d78e378156257d1a78d05ba9e9474d7cffdf

See more details on using hashes here.

Provenance

The following attestation bundles were made for pg0_embedded-0.15.0-py3-none-macosx_15_0_x86_64.whl:

Publisher: release-cli.yml on vectorize-io/pg0

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pg0_embedded-0.15.0-py3-none-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for pg0_embedded-0.15.0-py3-none-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 d233d9b669f1d9db5c76b77895c2135203771c266bf9f7d2b2378dae532ac615
MD5 e50ac01ecf421a6f1e01a44b17eb6fcf
BLAKE2b-256 7d2cc49730c8eacba9c8c68870510d59fd17c72ce5c9c7b7293a3cde27fbbff5

See more details on using hashes here.

Provenance

The following attestation bundles were made for pg0_embedded-0.15.0-py3-none-macosx_14_0_arm64.whl:

Publisher: release-cli.yml on vectorize-io/pg0

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page