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
openfunction. - You can close connection using
closefunction 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
Metadata
Release files for pypgdb 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pypgdb-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Release files / pypgdb-1.0.0-py3-none-any.whl
| Download URL | pypgdb-1.0.0-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cbf22b641ee5cf49a1547a1e53c23e08151ffa9ac6c331f94d778b0fb4d1a01e
|
|
BLAKE2b-256 checksum How to use checksums |
9f667a1d15b66e52276966d131bb265ef0600603f8480fa3cd3bfec14687c46b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|