SDK about postgres
Project description
pgpool
Install
pip3 install pypostgrestool==0.1
Usage
from pg_client import PostgresDB
db = PostgresDB(host="127.0.0.1", port=5432, user='postgres',
password='123456', db_name=my-db', min_conn=10,
max_conn=100)
# search
sql = "select * from my-tab"
print(db1.query_all(sql=sql))
Singleton
db1 = PostgresDB(host="127.0.0.1", port=5432, user='postgres',
password='123456', db_name=my-db', min_conn=10,
max_conn=100)
db2 = PostgresDB(host="127.0.0.1", port=5432, user='postgres',
password='123456', db_name=my-db', min_conn=10,
max_conn=100)
print(db1)
print(db2)
print(db1.pool)
print(db2.pool)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pypostgrestool-0.1.tar.gz
(1.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pypostgrestool-0.1.tar.gz.
File metadata
- Download URL: pypostgrestool-0.1.tar.gz
- Upload date:
- Size: 1.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f69b6563dbd8c0a001b9c78ef23b6acb251e76123a5fac136753648beb5b06bd
|
|
| MD5 |
ba8446432f2e2f49cd16fd979c1a6e71
|
|
| BLAKE2b-256 |
9be2d5d867117e823f36c75d0a6e336dbbbe5421cbd6676fec09e4b25c1be310
|
File details
Details for the file pypostgrestool-0.1-py3-none-any.whl.
File metadata
- Download URL: pypostgrestool-0.1-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b106f292fe162c471380c9ab78af7ba2f5fe162c4261bfcc9514ed837145e45f
|
|
| MD5 |
68216b80491958947bb2ea71db4eaaf3
|
|
| BLAKE2b-256 |
2466219658eb715249c39c4ada653f9883a19ac6dde2fc60e8f80cb3446aa669
|