{ "info": { "author": "AWeber Communications", "author_email": "api@aweber.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "sprockets.mixins.postgresql\n===========================\nHandler mixins that automatically connect a PostgreSQL client session upon initialization.\n\n|Version| |Downloads| |Status| |Coverage| |License|\n\nInstallation\n------------\nsprockets.mixins.postgresql is available on the\n`Python Package Index `_\nand can be installed via ``pip`` or ``easy_install``:\n\n.. code:: bash\n\n pip install sprockets.mixins.postgresql\n\nDocumentation\n-------------\nhttps://sprocketsmixinspostgresql.readthedocs.org\n\nRequirements\n------------\n- `sprockets `_\n- `sprockets.clients.postgresql `_\n\nExample\n-------\nThe following example demonstrates using the ``HandlerMixin`` with a\nsynchronous Tornado ``RequestHandler `` for a\ndatabase named ``postgres``:\n\n.. code:: python\n\n import os\n\n from sprockets.mixins import postgresql\n from tornado import web\n\n os.environ['POSTGRES_HOST'] = 'localhost'\n os.environ['POSTGRES_USER'] = 'postgres'\n os.environ['POSTGRES_PORT'] = 5432\n os.environ['POSTGRES_DBNAME'] = 'postgres'\n\n class PostgresRequestHandler(postgresql.HandlerMixin,\n web.RequestHandler):\n\n DBNAME = 'postgres'\n\n def get(self, *args, **kwargs):\n result = self.foo_session.query('SELECT * FROM bar')\n self.finish({'data': result.items()})\n\nThe second example demonstrates using the ``AsyncHandlerMixin`` with an\nasynchronous Tornado ``RequestHandler`` for a database named ``foo``:\n\n.. code:: python\n\n import os\n\n from sprockets.mixins import postgresql\n from tornado import web\n\n os.environ['FOO_HOST'] = 'localhost'\n os.environ['FOO_USER'] = 'postgres'\n os.environ['FOO_PORT'] = 5432\n os.environ['FOO_DBNAME'] = 'foo'\n os.environ['FOO_PASSWORD'] = 'bar'\n\n class FooRequestHandler(postgresql.AsyncHandlerMixin,\n web.RequestHandler):\n\n DBNAME = 'foo'\n\n @web.asynchronous\n def get(self, *args, **kwargs):\n result = yield self.foo_session.query('SELECT * FROM baz')\n self.finish({'data': result.items()})\n result.free()\n\nVersion History\n---------------\nAvailable at https://sprocketsmixinspostgresql.readthedocs.org/en/latest/history.html\n\n.. |Version| image:: https://badge.fury.io/py/sprockets.mixins.postgresql.svg?\n :target: http://badge.fury.io/py/sprockets.mixins.postgresql\n\n.. |Status| image:: https://travis-ci.org/sprockets/sprockets.mixins.postgresql.svg?branch=master\n :target: https://travis-ci.org/sprockets/sprockets.mixins.postgresql\n\n.. |Coverage| image:: https://img.shields.io/coveralls/sprockets/sprockets.mixins.postgresql.svg?\n :target: https://coveralls.io/r/sprockets/sprockets.mixins.postgresql\n\n.. |Downloads| image:: https://pypip.in/d/sprockets.mixins.postgresql/badge.svg?\n :target: https://pypi.python.org/pypi/sprockets.mixins.postgresql\n\n.. |License| image:: https://pypip.in/license/sprockets.mixins.postgresql/badge.svg?\n :target: https://sprocketsmixinspostgresql.readthedocs.org", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/sprockets/sprockets.mixins.postgresql.git", "keywords": null, "license": "Copyright (c) 2014 AWeber Communications\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation\n and/or other materials provided with the distribution.\n * Neither the name of Sprockets nor the names of its\n contributors may be used to endorse or promote products derived from this\n software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\nIN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\nINDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\nBUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\nLIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE\nOR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\nADVISED OF THE POSSIBILITY OF SUCH DAMAGE.", "maintainer": null, "maintainer_email": null, "name": "sprockets.mixins.postgresql", "package_url": "https://pypi.org/project/sprockets.mixins.postgresql/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/sprockets.mixins.postgresql/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/sprockets/sprockets.mixins.postgresql.git" }, "release_url": "https://pypi.org/project/sprockets.mixins.postgresql/1.0.1/", "requires_dist": null, "requires_python": null, "summary": "A sprockets mixin that automatically connects to PostgreSQL", "version": "1.0.1" }, "last_serial": 1547653, "releases": { "0.0.0": [], "1.0.1": [ { "comment_text": "", "digests": { "md5": "e133b5c9ff0166b0cbd5bdf1b7e3f4fe", "sha256": "6ab2db8947b2b273a7ada242980f29148fe268553f37d875ceac07f43e291052" }, "downloads": -1, "filename": "sprockets.mixins.postgresql-1.0.1.tar.gz", "has_sig": false, "md5_digest": "e133b5c9ff0166b0cbd5bdf1b7e3f4fe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8580, "upload_time": "2015-05-14T20:21:04", "url": "https://files.pythonhosted.org/packages/1a/6c/5fe7d4c9b89cb6b26b0256b6cac360a10365c9129fbc29cf7d249297df6c/sprockets.mixins.postgresql-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e133b5c9ff0166b0cbd5bdf1b7e3f4fe", "sha256": "6ab2db8947b2b273a7ada242980f29148fe268553f37d875ceac07f43e291052" }, "downloads": -1, "filename": "sprockets.mixins.postgresql-1.0.1.tar.gz", "has_sig": false, "md5_digest": "e133b5c9ff0166b0cbd5bdf1b7e3f4fe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8580, "upload_time": "2015-05-14T20:21:04", "url": "https://files.pythonhosted.org/packages/1a/6c/5fe7d4c9b89cb6b26b0256b6cac360a10365c9129fbc29cf7d249297df6c/sprockets.mixins.postgresql-1.0.1.tar.gz" } ] }