Documentation updates

This commit is contained in:
Gavin M. Roy 2020-04-08 18:22:24 -04:00
parent 58d349e790
commit 75b8d49bed
4 changed files with 12 additions and 8 deletions

View file

@ -1,5 +1,5 @@
PostgresConnector Postgres Connector
================= ==================
A :class:`~sprockets_postgres.PostgresConnector` instance contains a cursor for A :class:`~sprockets_postgres.PostgresConnector` instance contains a cursor for
a Postgres connection and methods to execute queries. a Postgres connection and methods to execute queries.

View file

@ -3,14 +3,13 @@ Example Web Application
The following code provides a simple example for using the The following code provides a simple example for using the
.. code-block:: python .. code-block:: python
import sprockets.http import sprockets.http
import sprockets_postgres as postgres import sprockets_postgres as postgres
from sprockets.http import app from sprockets.http import app
class RequestHandler(postgres.RequestHandlerMixin, class RequestHandler(postgres.RequestHandlerMixin, web.RequestHandler):
web.RequestHandler):
GET_SQL = """\ GET_SQL = """\
SELECT foo_id, bar, baz, qux SELECT foo_id, bar, baz, qux
@ -29,6 +28,9 @@ The following code provides a simple example for using the
setup the pool to connect to PostgreSQL and will shutdown the connections setup the pool to connect to PostgreSQL and will shutdown the connections
cleanly when the application stops. cleanly when the application stops.
It should be used in conjunction with ``sprockets.http.app.Application``
and not directly with ``tornado.web.Application``.
""" """

View file

@ -5,13 +5,15 @@ in :class:`Tornado <tornado.web.Application>` /
:class:`sprockets.http <sprockets.http.app.Application>` applications using :class:`sprockets.http <sprockets.http.app.Application>` applications using
:py:mod:`aiopg`. :py:mod:`aiopg`.
Python versions supported: 3.7+
Installation Installation
------------ ------------
``sprockets-postgres`` is available on the Python package index and is installable via pip: ``sprockets-postgres`` is available on the Python package index and is installable via pip:
.. code:: bash .. code:: bash
pip install sprockets-postgres pip3 install sprockets-postgres
Documentation Documentation

View file

@ -1,5 +1,5 @@
QueryResult Query Result
=========== ============
A :class:`~sprockets_postgres.QueryResult` instance is created for every query A :class:`~sprockets_postgres.QueryResult` instance is created for every query
and contains the count of rows effected by the query and either the ``row`` as and contains the count of rows effected by the query and either the ``row`` as
a :class:`dict` or ``rows`` as a list of :class:`dict`. For queries that do a :class:`dict` or ``rows`` as a list of :class:`dict`. For queries that do