{ "info": { "author": "Andrew Svetlov", "author_email": "andrew.svetlov@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: MacOS :: MacOS X", "Operating System :: POSIX", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Topic :: Database", "Topic :: Database :: Front-Ends" ], "description": "aiopg\n=======\n.. image:: https://travis-ci.org/aio-libs/aiopg.svg?branch=master\n :target: https://travis-ci.org/aio-libs/aiopg\n.. image:: https://coveralls.io/repos/aio-libs/aiopg/badge.svg\n :target: https://coveralls.io/r/aio-libs/aiopg\n\n**aiopg** is a library for accessing a PostgreSQL_ database\nfrom the asyncio_ (PEP-3156/tulip) framework. It wraps\nasynchronous features of the Psycopg database driver.\n\nExample\n-------\n\n::\n\n import asyncio\n from aiopg.pool import create_pool\n\n dsn = 'dbname=jetty user=nick password=1234 host=localhost port=5432'\n\n\n @asyncio.coroutine\n def test_select():\n pool = yield from create_pool(dsn)\n\n with (yield from pool) as conn:\n cur = yield from conn.cursor()\n yield from cur.execute('SELECT 1')\n ret = yield from cur.fetchone()\n assert ret == (1,), ret\n\n\n asyncio.get_event_loop().run_until_complete(test_select())\n\n\nExample of SQLAlchemy optional integration\n-------------------------------------------\n\n::\n\n import asyncio\n from aiopg.sa import create_engine\n import sqlalchemy as sa\n\n\n metadata = sa.MetaData()\n\n tbl = sa.Table('tbl', metadata,\n sa.Column('id', sa.Integer, primary_key=True),\n sa.Column('val', sa.String(255)))\n\n\n @asyncio.coroutine\n def go():\n engine = yield from create_engine(user='aiopg',\n database='aiopg',\n host='127.0.0.1',\n password='passwd')\n\n with (yield from engine) as conn:\n yield from conn.execute(tbl.insert().values(val='abc'))\n\n res = yield from conn.execute(tbl.select())\n for row in res:\n print(row.id, row.val)\n\n\n asyncio.get_event_loop().run_until_complete(go())\n\n.. _PostgreSQL: http://www.postgresql.org/\n.. _asyncio: http://docs.python.org/3.4/library/asyncio.html\n\nPlease use::\n\n $ python3 runtests.py\n\nfor executing project's unittests\n\nCHANGES\n-------\n\n0.8.0 (XXXX-XX-XX)\n^^^^^^^^^^^^^^^^^^\n\n* Add PostgreSQL notification support #58\n\n* Support pools with unlimited size #59\n\n\n0.7.0 (2015-04-22)\n^^^^^^^^^^^^^^^^^^\n\n* Get rid of resource leak on connection failure.\n\n* Report ResourceWarning on non-closed connections.\n\n* Deprecate iteration protocol support in cursor and ResultProxy.\n\n* Release sa connection to pool on `connection.close()`.\n\n0.6.0 (2015-02-03)\n^^^^^^^^^^^^^^^^^^\n\n* Accept dict, list, tuple, named and positional parameters in\n `SAConnection.execute()`\n\n0.5.2 (2014-12-08)\n^^^^^^^^^^^^^^^^^^\n\n* Minor release, fixes a bug that leaves connection in broken state\n after `cursor.execute()` failure.\n\n0.5.1 (2014-10-31)\n^^^^^^^^^^^^^^^^^^\n\n* Fix a bug for processing transactions in line.\n\n0.5.0 (2014-10-31)\n^^^^^^^^^^^^^^^^^^\n\n* Add .terminate() to Pool and Engine\n\n* Reimplement connection pool (now pool size cannot be greater than pool.maxsize)\n\n* Add .close() and .wait_closed() to Pool and Engine\n\n* Add minsize, maxsize, size and freesize properties to sa.Engine\n\n* Support *echo* parameter for logging executed SQL commands\n\n* Connection.close() is not a coroutine (but we keep backward compatibility).\n\n0.4.1 (2014-10-02)\n^^^^^^^^^^^^^^^^^^\n\n* make cursor iterable\n\n* update docs\n\n0.4.0 (2014-10-02)\n^^^^^^^^^^^^^^^^^^\n\n* add timeouts for database operations.\n\n* Autoregister psycopg2 support for json data type.\n\n* Support JSON in aiopg.sa\n\n* Support ARRAY in aiopg.sa\n\n* Autoregister hstore support if present in connected DB\n\n* Support HSTORE in aiopg.sa\n\n0.3.2 (2014-07-07)\n^^^^^^^^^^^^^^^^^^\n\n* change signature to cursor.execute(operation, parameters=None) to\n follow psycopg2 convention.\n\n0.3.1 (2014-07-04)\n^^^^^^^^^^^^^^^^^^\n\n* Forward arguments to cursor constructor for pooled connections.\n\n0.3.0 (2014-06-22)\n^^^^^^^^^^^^^^^^^^\n\n* Allow executing SQLAlchemy DDL statements.\n\n* Fix bug with race conditions on acquiring/releasing connections from pool.\n\n0.2.3 (2014-06-12)\n^^^^^^^^^^^^^^^^^^\n\n* Fix bug in connection pool.\n\n0.2.2 (2014-06-07)\n^^^^^^^^^^^^^^^^^^\n\n* Fix bug with passing parameters into SAConnection.execute when\n executing raw SQL expression.\n\n0.2.1 (2014-05-08)\n^^^^^^^^^^^^^^^^^^\n\n* Close connection with invalid transaction status on returning to pool.\n\n0.2.0 (2014-05-04)\n^^^^^^^^^^^^^^^^^^\n\n* Implemented optional support for sqlalchemy functional sql layer.\n\n0.1.0 (2014-04-06)\n^^^^^^^^^^^^^^^^^^\n\n* Implemented plain connections: connect, Connection, Cursor.\n\n* Implemented database pools: create_pool and Pool.", "description_content_type": null, "docs_url": null, "download_url": "https://pypi.python.org/pypi/aiopg", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://aiopg.readthedocs.org", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "aiopgx", "package_url": "https://pypi.org/project/aiopgx/", "platform": "POSIX", "project_url": "https://pypi.org/project/aiopgx/", "project_urls": { "Download": "https://pypi.python.org/pypi/aiopg", "Homepage": "http://aiopg.readthedocs.org" }, "release_url": "https://pypi.org/project/aiopgx/0.7.0/", "requires_dist": null, "requires_python": null, "summary": "Postgres integration with asyncio.", "version": "0.7.0" }, "last_serial": 1647736, "releases": { "0.7.0": [ { "comment_text": "", "digests": { "md5": "5dd9ba7b7b3b3ab3df3aea2069007efe", "sha256": "7caea905fe97d594ec390ac360d1b8d4438c16405fce2e93e3663ac3db469c0d" }, "downloads": -1, "filename": "aiopgx-0.7.0.tar.gz", "has_sig": false, "md5_digest": "5dd9ba7b7b3b3ab3df3aea2069007efe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21582, "upload_time": "2015-07-24T08:50:50", "url": "https://files.pythonhosted.org/packages/91/b3/86754b218f0c1a5611183321feddfe95844e17da8e5e3aeebf97465574dc/aiopgx-0.7.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5dd9ba7b7b3b3ab3df3aea2069007efe", "sha256": "7caea905fe97d594ec390ac360d1b8d4438c16405fce2e93e3663ac3db469c0d" }, "downloads": -1, "filename": "aiopgx-0.7.0.tar.gz", "has_sig": false, "md5_digest": "5dd9ba7b7b3b3ab3df3aea2069007efe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21582, "upload_time": "2015-07-24T08:50:50", "url": "https://files.pythonhosted.org/packages/91/b3/86754b218f0c1a5611183321feddfe95844e17da8e5e3aeebf97465574dc/aiopgx-0.7.0.tar.gz" } ] }