Skip to main content

SimplePG

Simple PostgreSQL connections: a wrapper around psycopg2.

Features:

  • Thread-safe connection pooling
  • Auto-reconnect on connection loss
  • Unified interface for execute, executemany, and execute_values

Installation

pip install simplepg

Example

from simplepg import DbConnection

db = DbConnection(
    user="postgres",
    password="postgres",
    host="localhost",
    port=5432,
    database="postgres",
    connect_kwargs={},
    pool_min_connections=1,
    pool_max_connections=1,
)

db.execute("CREATE TABLE test_table (id SERIAL PRIMARY KEY, name VARCHAR)")
db.execute_values("INSERT INTO test_table (name) VALUES %s", [("test1",), ("test2",)])
records, columns = db.execute("SELECT * FROM test_table")
db.execute("DROP TABLE test_table")

Metadata

Release files for simplepg 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for simplepg 0.1.5
File Size Uploaded Provenance Actions
simplepg-0.1.5.tar.gz 7.7 kB Without provenance Details for simplepg-0.1.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for simplepg 0.1.5
File Interpreter ABI Platform Actions
simplepg-0.1.5-py3-none-any.whl Python 3 none any Details for simplepg-0.1.5-py3-none-any.whl

Total release size: 15.4 kB

Release files / simplepg-0.1.5.tar.gz

Download URL simplepg-0.1.5.tar.gz
Size 7.7 kB
Tags Source
SHA-256 checksum
How to use checksums
4a8314e155131b58fe7cb0e93596717e065b828d21e78eba4a4d6a3cab4b5466
BLAKE2b-256 checksum
How to use checksums
5199150df6367ce542317c8eef0f8e9234460514c37735f01c1828776a5e9b8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.2 CPython/3.10.4 Linux/6.2.6-76060206-generic

Release files / simplepg-0.1.5-py3-none-any.whl

Download URL simplepg-0.1.5-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
71e165c31333509270a5d73bae48147ca8b2ed7e2b96ff9e632e9552793197d3
BLAKE2b-256 checksum
How to use checksums
fea49eb56fd880a7bff6f8f7370ae7c16686e6d1e92c28d621240ff563f28fa1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.2 CPython/3.10.4 Linux/6.2.6-76060206-generic

Security for simplepg 0.1.5

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