{ "info": { "author": "Florent Xicluna", "author_email": "florent.xicluna@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: ISC License (ISCL)", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Topic :: Database", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "===================\nLight PgQ Framework\n===================\n\nThis module provides a convenient Python API to integrate\nPostgreSQL PgQ features with any Python application.\n\n\nPresentation of PgQ\n-------------------\n\n*(from SkyTools README)*\n\nPgQ is a queuing system written in PL/pgSQL, Python and C code. It is\nbased on snapshot-based event handling ideas from Slony-I, and is\nwritten for general usage.\n\nPgQ provides an efficient, transactional queueing system with\nmulti-node support (including work sharing and splitting, failover and\nswitchover, for queues and for consumers).\n\nRules:\n\n- There can be several queues in a database.\n- There can be several producers than can insert into any queue.\n- There can be several consumers on one queue.\n- There can be several subconsumers on a consumer.\n\nPgQ is split into 3 layers: Producers, Ticker and Consumers.\n\n**Producers** and **Consumers** respectively push and read events into\na queue. Producers just need to call PostgreSQL stored procedures\n(like a trigger on a table or a PostgreSQL call from the application).\nConsumers are frequently written in Python, but any language able to\nrun PostgreSQL stored procedures can be used.\n\n**Ticker** is a daemon which splits the queues into batches of events and\nhandle the maintenance of the system.\n\n\nThe PgQueue module\n------------------\n\nThis module provides Python functions and classes to write **Producers**\nand **Consumers**.\nIt contains also a Python implementation of the **Ticker** engine, which\nmimics the original C Ticker from SkyTools: it splits batches of events,\nand execute maintenance tasks.\n\n\nInstallation\n------------\n\nPrerequisites:\n\n- Python >= 2.6 or Python 3\n- psycopg2 is automatically installed as a dependency\n- (on the server) the ``PgQ`` extension version >= 3.1\n\nOn Debian / Ubuntu you will add `the PostgreSQL APT repository\n`_, then install the package\n``postgresql-x.x-pgq3`` depending on the PostgreSQL version.\n\nFinally create the extension in the database:\n\n::\n\n CREATE EXTENSION IF NOT EXISTS pgq;\n\nYou can install the ``pgqueue`` module into your environment.\n\n::\n\n pip install --update pgqueue\n\n\nExample usage\n-------------\n\nYou need to run the **Ticker** permanently.\nIf the Ticker is off, the events will be stored into the queues,\nbut no batch will be prepared for the consumers, and event tables will\ngrow quickly.\n\nFor the Ticker, you have the choice between the optimized ``pgqd``\nmulti-database ticker written in C, and part of SkyTools, or use the\nsimpler Python implementation provided with this module:\n\n::\n\n python -m pgqueue 'host=127.0.0.1 port=5432 user=jules password=xxxx dbname=test_db'\n\nLet's create a new queue, and register a consumer:\n\n::\n\n conn = psycopg2.connect(\"dbname=test user=postgres\")\n conn.autocommit = True\n cursor = conn.cursor()\n\n first_q = pgqueue.Queue('first_queue')\n first_q.create(cursor, ticker_max_lag='4 seconds')\n\n consum_q = pgqueue.Consumer('first_queue', 'consumer_one')\n consum_q.register(cursor)\n\n\nWe're ready to produce events into the queue, and consume events\nlater in the application:\n\n::\n\n first_q.insert_event(cursor, 'announce', 'Hello ...')\n first_q.insert_event(cursor, 'announce', 'Hello world!')\n\n # ... wait a little bit\n\n conn.autocommit = False\n for event in consum_q.next_events(cursor, commit=True):\n print(event)\n\nYou can browse the source code for advanced usage, until we write\nmore documentation (contributions are welcomed).\n\nAlso refer to `the upstream documentation for more details\n`_.\n\n\nCredits\n-------\n\nPgQ is a PostgreSQL extension which is developed by Marko Kreen.\nIt is `part of SkyTools `_,\na package of tools in use in Skype for replication and failover.\n\nSkyTools embeds also a ``pgq`` Python framework which provides a\nslightly different API.\n\n\nLinks\n-----\n\n.. image:: https://travis-ci.org/florentx/pgqueue.svg?branch=master\n :target: https://travis-ci.org/florentx/pgqueue\n :alt: Build status\n\n* `Fork me on GitHub `_", "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/florentx/pgqueue", "keywords": "postgresql pgq queue", "license": "ISC", "maintainer": null, "maintainer_email": null, "name": "pgqueue", "package_url": "https://pypi.org/project/pgqueue/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pgqueue/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/florentx/pgqueue" }, "release_url": "https://pypi.org/project/pgqueue/0.6/", "requires_dist": null, "requires_python": null, "summary": "Light PgQ Framework - queuing system for PostgreSQL", "version": "0.6" }, "last_serial": 1904988, "releases": { "0.0.0": [], "0.3": [ { "comment_text": "", "digests": { "md5": "c09c7b552b26ef529ebebab492dca7ec", "sha256": "141e5d93e2f8abc10d3b0abd01106276119e08b6ee64cbda045c6547071116a9" }, "downloads": -1, "filename": "pgqueue-0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c09c7b552b26ef529ebebab492dca7ec", "packagetype": "bdist_wheel", "python_version": "3.3", "requires_python": null, "size": 11419, "upload_time": "2014-05-25T15:56:57", "url": "https://files.pythonhosted.org/packages/8c/b2/09b1aa9eb8af2ba7da6a39d184d9e5303208687c2986bf618caae84a1551/pgqueue-0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "50827a9215276848cfd150c63a17ecd5", "sha256": "e363c031b1948a9a63fa9afd4129ab4ca8e49931c2bc2d5e51b1901a4eea917f" }, "downloads": -1, "filename": "pgqueue-0.3.tar.gz", "has_sig": false, "md5_digest": "50827a9215276848cfd150c63a17ecd5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13331, "upload_time": "2014-05-25T15:56:54", "url": "https://files.pythonhosted.org/packages/eb/44/3cf2ff83d4fe525d004dbbc6ed484261e0f2a2bb6f8665c13df12ef5a319/pgqueue-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "eeb5539f4c2e75af2876f843532cc3e3", "sha256": "ee1f492c895b724c19c6570b933bf267a3d56fb6bcf587e465c2b42e84c70f67" }, "downloads": -1, "filename": "pgqueue-0.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "eeb5539f4c2e75af2876f843532cc3e3", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 11905, "upload_time": "2014-09-22T14:14:14", "url": "https://files.pythonhosted.org/packages/7d/71/07bbe53dc7a1d61128c1bb744f7d644594dccae46afcc6ad820bb3df0596/pgqueue-0.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b51b73624696d3b33504e926e9bacfa9", "sha256": "6f25378b2480db16a7cf9c2c2fef85db880444fae6ff5a479ae61bc74517ab75" }, "downloads": -1, "filename": "pgqueue-0.4.tar.gz", "has_sig": false, "md5_digest": "b51b73624696d3b33504e926e9bacfa9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15263, "upload_time": "2014-09-22T14:14:11", "url": "https://files.pythonhosted.org/packages/f7/28/ec464f922d42c8127ace29f7c5ea15fb428997ab8b3f560c539e9fb3b2a1/pgqueue-0.4.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "75e3cf194720ddd0d66abcb3198e3596", "sha256": "f7a090cd0899512a57a1413bff11958b2d02b7cf0b65a89b38fb9ccf197553a7" }, "downloads": -1, "filename": "pgqueue-0.4.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "75e3cf194720ddd0d66abcb3198e3596", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 11875, "upload_time": "2015-10-17T20:15:40", "url": "https://files.pythonhosted.org/packages/01/9a/4432f65166d1395328265c3e18ec15d4fefd2b1f681d797666b81d40ffac/pgqueue-0.4.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3d23018fb04b41ac1c02d7407915c19c", "sha256": "ed0caac971a4b83690bc1fb041c6b71c69993868513b199d8f4ee2cd947696c8" }, "downloads": -1, "filename": "pgqueue-0.4.1.tar.gz", "has_sig": false, "md5_digest": "3d23018fb04b41ac1c02d7407915c19c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14721, "upload_time": "2015-10-17T20:15:35", "url": "https://files.pythonhosted.org/packages/9c/81/297c227d5f5c3f7f15815aa64ed9359fe361df633052683d813a7357df1a/pgqueue-0.4.1.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "14010a3207ee8d102bcd314db2ba6d1b", "sha256": "024dbfb9d16a4d88c0104249e1891707e4ab13d549bcd42dd244c892d31fbde5" }, "downloads": -1, "filename": "pgqueue-0.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "14010a3207ee8d102bcd314db2ba6d1b", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 11906, "upload_time": "2015-12-16T15:25:08", "url": "https://files.pythonhosted.org/packages/d6/7e/9cde386ef12caad2d939c524a2ebf7306a3a2edd07f4a10547c8b20b52d6/pgqueue-0.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0eaea2eb86ff1998fea9cc1c0522fa31", "sha256": "507ab981047ea20fea14cf54cb06e26d66a2d8a46f934e2fcedb95610b517cc5" }, "downloads": -1, "filename": "pgqueue-0.5.tar.gz", "has_sig": false, "md5_digest": "0eaea2eb86ff1998fea9cc1c0522fa31", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15738, "upload_time": "2015-12-16T15:25:02", "url": "https://files.pythonhosted.org/packages/f1/4d/1258bd6d284b4b441a1c02b9067feb26e58684b00e330b1e98bf73d5e666/pgqueue-0.5.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "6e132dde3ea448288b88a2cfae183139", "sha256": "d69c2e39fa7159eb8a3d2af96fb98912b4226aa0d572007a2ee4ffed3ad8bb19" }, "downloads": -1, "filename": "pgqueue-0.6.tar.gz", "has_sig": false, "md5_digest": "6e132dde3ea448288b88a2cfae183139", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16089, "upload_time": "2016-01-14T21:24:40", "url": "https://files.pythonhosted.org/packages/1f/82/5eb55d81b9671b930053a202aeafaf1de961481ffaf21a1417f8a162eab3/pgqueue-0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6e132dde3ea448288b88a2cfae183139", "sha256": "d69c2e39fa7159eb8a3d2af96fb98912b4226aa0d572007a2ee4ffed3ad8bb19" }, "downloads": -1, "filename": "pgqueue-0.6.tar.gz", "has_sig": false, "md5_digest": "6e132dde3ea448288b88a2cfae183139", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16089, "upload_time": "2016-01-14T21:24:40", "url": "https://files.pythonhosted.org/packages/1f/82/5eb55d81b9671b930053a202aeafaf1de961481ffaf21a1417f8a162eab3/pgqueue-0.6.tar.gz" } ] }