Skip to main content

PyPostgreSQLWrapper is a simple adapter for PostgreSQL with connection pooling

Project description

PyPostgreSQLWrapper

PyPostgreSQLWrapper is a simple adapter for PostgreSQL with connection pooling.

Configuration

The configuration can be done through JSON file or by Dict following the pattern described below:

{
  "dbname": "postgres",
  "host": "localhost",
  "maxconnections": 10,
  "password": "postgres",
  "port": 5432,
  "print_sql": true,
  "user": "postgres"
}

Usage

PyPostgreSQLWrapper usage description:

SQL

from py_postgresql_wrapper.database import Database

with Database() as database:
    database.execute('''
        create table test (
            id int primary key,
            description varchar(255)
        )
    ''')

Insert

from py_postgresql_wrapper.database import Database

with Database() as database:
    database.insert('test').set('id', 1).set('description', 'Test').execute()

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 Distributions

py_postgresql_wrapper-1.0.0-py3-none-any.whl (17.4 kB view hashes)

Uploaded Python 3

py_postgresql_wrapper-1.0.0-py2-none-any.whl (17.4 kB view hashes)

Uploaded Python 2

Supported by

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