Skip to content

sprockets/sprockets.clients.postgresql

Repository files navigation

sprockets.clients.postgresql

The sprockets.clients.postgresql package wraps the queries package providing environment variable based configuration for connecting to PostgreSQL.

Version Downloads Status Coverage License

Installation

sprockets.clients.postgresql is available on the Python Package Index and can be installed via pip or easy_install:

pip install sprockets.clients.postgresql

Documentation

https://sprocketsclientspostgresql.readthedocs.org

Requirements

Example

The following example sets the environment variable for connecting to PostgreSQL on localhost to the production database and issues a query.

import os

from sprockets.clients import postgresql

os.environ['PGSQL_PROD'] = 'postgresql://postgres@localhost:5432/production'

session = postgresql.Session('prod')
result = session.query('SELECT 1')
print(repr(result))

Version History

Available at https://sprocketsclientspostgresql.readthedocs.org/en/latest/history.html

About

PostgreSQL client library wrapper providing environment variable based configuration

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages