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.1.tar.gz (20.2 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.1-py3-none-win_amd64.whl (55.1 MB view details)

Uploaded Python 3Windows x86-64

pg0_embedded-0.15.1-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.1-py3-none-manylinux_2_35_aarch64.whl (29.8 MB view details)

Uploaded Python 3manylinux: glibc 2.35+ ARM64

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

Uploaded Python 3macOS 15.0+ x86-64

pg0_embedded-0.15.1-py3-none-macosx_14_0_arm64.whl (13.0 MB view details)

Uploaded Python 3macOS 14.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for pg0_embedded-0.15.1.tar.gz
Algorithm Hash digest
SHA256 3fef3f250f722e49f0a762d0bcf4f776948a13c852dfae505c2e3ba512391cc5
MD5 b0214a0f446c225a1973ac4df1bf0355
BLAKE2b-256 fca0fc5c00e78a955d3de39ad135cd736c336aa32f852b86b7a9eb862687aed7

See more details on using hashes here.

Provenance

The following attestation bundles were made for pg0_embedded-0.15.1.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.1-py3-none-win_amd64.whl.

File metadata

  • Download URL: pg0_embedded-0.15.1-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/7.0.0 CPython/3.13.14

File hashes

Hashes for pg0_embedded-0.15.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 35a245d29452915a314ecb655f33a35d8d881583d6c00373ef616a47a84c639f
MD5 a17716f880812427e6ea643acdb40d7e
BLAKE2b-256 0d3cfa8526ce1f7ddc0283370629593f2f7303288cb74d1c67eacbabbc4ecf57

See more details on using hashes here.

Provenance

The following attestation bundles were made for pg0_embedded-0.15.1-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.1-py3-none-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for pg0_embedded-0.15.1-py3-none-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 24336e666bd3c954cb70fac2f93db1f928116aa92cbd0aba9320f789acfbb263
MD5 c308453893bc15ce2096dfaa46f22ebd
BLAKE2b-256 ef9397e02722ca40c3e9907c641866f8f29479f406e7087d09fe3fbf3de61bbb

See more details on using hashes here.

Provenance

The following attestation bundles were made for pg0_embedded-0.15.1-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.1-py3-none-manylinux_2_35_aarch64.whl.

File metadata

File hashes

Hashes for pg0_embedded-0.15.1-py3-none-manylinux_2_35_aarch64.whl
Algorithm Hash digest
SHA256 96e1b0867421e3553e34b39c7492b2301aff34f85eeef7a553d45601fd2f4d77
MD5 e2e65724e311ff995c23897c6ae2f804
BLAKE2b-256 66d62e86e879cfd9b1ddc1bf7ad807c0e09329cf2b1c1c488d668eb9fd8ab2d9

See more details on using hashes here.

Provenance

The following attestation bundles were made for pg0_embedded-0.15.1-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.1-py3-none-macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for pg0_embedded-0.15.1-py3-none-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 3eef6291a7fda4332d760c0a417f2e1930cfb4fc80c1b98b10583b0f958cc3e1
MD5 74bb2420d3d75410e4569f20033465a8
BLAKE2b-256 778e12461ef13df28a00158204c02e2e6ca327bd52aac4edfdec11936161cad8

See more details on using hashes here.

Provenance

The following attestation bundles were made for pg0_embedded-0.15.1-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.1-py3-none-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for pg0_embedded-0.15.1-py3-none-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 b014d6bb49246ebe8ca2ab25503e366aeccfa87b89760ca7a7e701de8c148471
MD5 5608556bff08f0b0873f96186a2ac041
BLAKE2b-256 d8058033f5c326691ba5563b80c6bcb7a420276eba729c81c59fed48e1bdbb74

See more details on using hashes here.

Provenance

The following attestation bundles were made for pg0_embedded-0.15.1-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