Skip to main content

PostgreSQL client library wrapper providing environment variable based configuration

Project description

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

Project details


Download files

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

Source Distribution

sprockets.clients.postgresql-2.0.0.tar.gz (4.8 kB view details)

Uploaded Source

File details

Details for the file sprockets.clients.postgresql-2.0.0.tar.gz.

File metadata

File hashes

Hashes for sprockets.clients.postgresql-2.0.0.tar.gz
Algorithm Hash digest
SHA256 aa7c3c9747e73cd4bfea9f5c9788355dd5d586f9382c20f9408914c0742ab822
MD5 94cf147a503a8d2be42b05cc83739494
BLAKE2b-256 a77dd98a1f83a861cf00db1464038da667fb89202a93d585342ec8afd19e47d0

See more details on using hashes here.

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