PostgreSQL client library wrapper providing environment variable based configuration
Go to file
Gavin M. Roy 534bfb0744 Merge pull request #4 from sprockets/create-sessions-wo-envvar
Create sessions from URL
2014-11-14 09:36:53 -05:00
docs Bump version to 2.0.1. 2014-11-14 08:14:46 -05:00
sprockets Bump version to 2.0.1. 2014-11-14 08:14:46 -05:00
.gitignore Initial commit 2014-08-28 18:44:35 -04:00
.travis.yml Add ease of use imports and add integration tests 2014-09-05 16:16:09 -04:00
LICENSE Initial commit 2014-08-29 11:07:04 -04:00
MANIFEST.in Add ease of use imports and add integration tests 2014-09-05 16:16:09 -04:00
README.rst Change to URI based env var config 2014-10-07 11:59:15 -04:00
dev-requirements.txt Add tox for local multi-version testing. 2014-11-14 08:13:45 -05:00
requirements.txt Add ease of use imports and add integration tests 2014-09-05 16:16:09 -04:00
setup.cfg Add ease of use imports and add integration tests 2014-09-05 16:16:09 -04:00
setup.py Bump version to 2.0.1. 2014-11-14 08:14:46 -05:00
test-requirements.txt Add ease of use imports and add integration tests 2014-09-05 16:16:09 -04:00
tests.py Add db_url parameter to session classes. 2014-11-14 08:11:07 -05:00
tox.ini Add tox for local multi-version testing. 2014-11-14 08:13:45 -05:00

README.rst

sprockets.clients.postgresql
============================
The ``sprockets.clients.postgresql`` package wraps the
`queries <http://queries.readthedocs.org>`_ 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 <https://pypi.python.org/pypi/sprockets.clients.postgresql>`_
and can be installed via ``pip`` or ``easy_install``:

.. code:: bash

    pip install sprockets.clients.postgresql

Documentation
-------------
https://sprocketsclientspostgresql.readthedocs.org

Requirements
------------
-  `queries`_

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

.. code:: python

    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

.. |Version| image:: https://badge.fury.io/py/sprockets.clients.postgresql.svg?
   :target: http://badge.fury.io/py/sprockets.clients.postgresql

.. |Status| image:: https://travis-ci.org/sprockets/sprockets.clients.postgresql.svg?branch=master
   :target: https://travis-ci.org/sprockets/sprockets.clients.postgresql

.. |Coverage| image:: https://img.shields.io/coveralls/sprockets/sprockets.clients.postgresql.svg?
   :target: https://coveralls.io/r/sprockets/sprockets.clients.postgresql

.. |Downloads| image:: https://pypip.in/d/sprockets.clients.postgresql/badge.svg?
   :target: https://pypi.python.org/pypi/sprockets.clients.postgresql

.. |License| image:: https://pypip.in/license/sprockets.clients.postgresql/badge.svg?
   :target: https://sprocketsclientspostgresql.readthedocs.org