Skip to main content

A wrapper around psycopg2

Project description

pypgdb

pgdb is a simple wrapper around psycopg2 python library to simplify its usage.

  • Connection is established before the first query or manually by calling open function.
  • You can close connection using close function or by deleting PGDB object.
  • Use logger object for more output information pgdb.logger.setLevel(logging.INFO)

Typical usage example

from pypgdb import pgdb
import logging
db = pgdb.PGDB("host=127.0.0.1 dbname=my_db port=5432 user=myUser password=myPassword")
pgdb.logger.setLevel(logging.INFO)
res = db.query("SELECT 'hello world'::TEXT, NOW()")

Installation

pypgdb requires psycopg2>=2.8.3 to run.

pip installation:

pip install pypgdb

Install from source:

python setup.py bdist_wheel
pip install dist\pypgdb-VERSION-py3-none-any.whl

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

pypgdb-1.0.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file pypgdb-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: pypgdb-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.5.4

File hashes

Hashes for pypgdb-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cbf22b641ee5cf49a1547a1e53c23e08151ffa9ac6c331f94d778b0fb4d1a01e
MD5 e3057bbd79f6ab1d06eac3e7af894789
BLAKE2b-256 9f667a1d15b66e52276966d131bb265ef0600603f8480fa3cd3bfec14687c46b

See more details on using hashes here.

Supported by

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