{ "info": { "author": "Victor A. Martinez Santiago", "author_email": "victor@plazsa.com", "bugtrack_url": null, "classifiers": [], "description": "Copyright (c) 2017 Victor A. Martinez Santiago\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\nDescription: geteventstore\n ========================\n \n This is a simple implementation of the Event Store client for the HTTP interface. It uses asyncio to asyncly parse events\n \n ## Reference\n \n Accessing the Event Store\n \n ### Client\n \n `Client(options) -> client`\n \n Creates a new event store client. The keyword arguments are:\n \n - `host`: host of the RethinkDB instance. The default value is `localhost`.\n - `port`: the driver port, by default `2113`.\n - `loop`: the asyncio event loop, by default `asyncio.get_event_loop()`\n \n *Example*: Create a new client to the default event store\n \n ```python\n loop=asyncio.get_event_loop()\n client = geteventstore.Client(loop=loop)\n ```\n \n ### stream_reader\n \n `client.stream_reader(options) -> Reader`\n \n Creates a stream reader. The keyword arguments are:\n \n - `stream`: the stream to read from.\n \n *Example*: Create a new stream readers\n \n ```python\n import geteventstore\n import asyncio\n \n async def test(loop):\n try:\n current = 0\n poll = 10\n while True:\n current = await get_events(loop, current, poll)\n except KeyboardInterrupt:\n return\n \n async def get_events(loop, current=0, poll=0):\n client = geteventstore.Client(loop=loop)\n reader = client.stream_reader('flyers')\n reader.next_version = current\n if poll > 0:\n reader.long_poll(poll)\n \n async for event, meatadata, updated in reader:\n print(event)\n print(metadata)\n print(updated)\n return reader.next_version\n \n if __name__ == '__main__':\n loop = asyncio.get_event_loop()\n loop.run_until_complete(test(loop))\n ```\n \n ### Reader\n \n `geteventstore.Reader(options) -> Reader`\n \n Creates a stream reader. The keyword arguments are:\n \n - `stream`: the stream to read from\n - `client`: the geteventstore client\n - `feed_parser`: the feed parser to use, defaults to `feedparser`. Must be compatible with feedparser\n - `http`: the http client to use, defaults to `aiohttp`. Must be compatible with aiohttp\n \n *Example*: Create a new stream and read from *text*\n \n ```python\n import geteventstore\n import asyncio\n \n async def test(loop):\n try:\n current = 0\n poll = 10\n while True:\n current = await get_events(loop, current, poll)\n except KeyboardInterrupt:\n return\n \n async def get_events(loop, current=0, poll=0):\n client = geteventstore.Client(loop=loop)\n reader = geteventstore.Reader('flyers', client)\n reader.next_version = current\n if poll > 0:\n reader.long_poll(poll)\n \n async for event, _, updated in reader:\n print(event.id)\n print(updated)\n return reader.next_version\n \n if __name__ == '__main__':\n loop = asyncio.get_event_loop()\n loop.run_until_complete(test(loop))\n ```\n \n TODO:\n \n - [-] Read from stream\n - [x] Catchup subscription\n - [x] Volatile Subscriptions\n - [ ] Persistent Subscription\n - [x] Write to stream\nPlatform: UNKNOWN\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/vectorhacker/pygeteventstore", "keywords": "", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "geteventstore", "package_url": "https://pypi.org/project/geteventstore/", "platform": "", "project_url": "https://pypi.org/project/geteventstore/", "project_urls": { "Homepage": "https://github.com/vectorhacker/pygeteventstore" }, "release_url": "https://pypi.org/project/geteventstore/0.0.4/", "requires_dist": null, "requires_python": "", "summary": "Python HTTP Client for the Event Store API", "version": "0.0.4" }, "last_serial": 4105275, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "7f25d77b364ff8a9e7040a9a1e3a096b", "sha256": "81eec344f6179f7fd5d2417132708ed97d9472688ad4c862dd55d9b4f3cbe1b4" }, "downloads": -1, "filename": "geteventstore-0.0.1.tar.gz", "has_sig": false, "md5_digest": "7f25d77b364ff8a9e7040a9a1e3a096b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3787, "upload_time": "2017-02-14T15:41:53", "url": "https://files.pythonhosted.org/packages/c3/6d/4c58d8bd1bf114342beb0ff1cee291bf5fe987616f8bd56956c516c6ed2d/geteventstore-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "875436c4429c15185c538db87de6535d", "sha256": "9e6ec7a2710ddb775d53780c25b1fd3c3844cfdf7dc019ca73da3a468e7e6773" }, "downloads": -1, "filename": "geteventstore-0.0.2.tar.gz", "has_sig": false, "md5_digest": "875436c4429c15185c538db87de6535d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3860, "upload_time": "2017-02-15T04:36:29", "url": "https://files.pythonhosted.org/packages/5e/56/02a43ca5739117fc06dad3802784ed26de9c0e53f9b615f583291dbf5ff6/geteventstore-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "b4de158ec506168d4acf93b5f07c3ca2", "sha256": "176eec9b0a9e6345ca3517e8ca5430fcf295acdc15873f67dc19651d76e59ce9" }, "downloads": -1, "filename": "geteventstore-0.0.3.tar.gz", "has_sig": false, "md5_digest": "b4de158ec506168d4acf93b5f07c3ca2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3853, "upload_time": "2017-02-15T04:38:44", "url": "https://files.pythonhosted.org/packages/6b/c3/ea8b6712ba5fbf7e33794ae25b22e9cc0ce147717d12962ba9e6652fdf84/geteventstore-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "1dccec9a8d924949684d8a441dfff8fd", "sha256": "31efbdeea00adfb4f45290577e66668627376e5320275435254980044498e989" }, "downloads": -1, "filename": "geteventstore-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "1dccec9a8d924949684d8a441dfff8fd", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5245, "upload_time": "2018-07-26T16:18:51", "url": "https://files.pythonhosted.org/packages/cc/99/0d3a8bbcae118c8996e53eb47d91b9de04dc11a00c619333d2fafc561f3a/geteventstore-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "327d673306eaa998ae111d8d570f94cb", "sha256": "8b374088a1533c5868d4361d018331b959cba49ce8c88bf37eb00b21006efec4" }, "downloads": -1, "filename": "geteventstore-0.0.4.tar.gz", "has_sig": false, "md5_digest": "327d673306eaa998ae111d8d570f94cb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4111, "upload_time": "2018-07-26T16:18:52", "url": "https://files.pythonhosted.org/packages/7d/05/097ac82d2755d1f4574b101ce88e3aa6ac186d05b2aee428b2d6a67ebd44/geteventstore-0.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1dccec9a8d924949684d8a441dfff8fd", "sha256": "31efbdeea00adfb4f45290577e66668627376e5320275435254980044498e989" }, "downloads": -1, "filename": "geteventstore-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "1dccec9a8d924949684d8a441dfff8fd", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5245, "upload_time": "2018-07-26T16:18:51", "url": "https://files.pythonhosted.org/packages/cc/99/0d3a8bbcae118c8996e53eb47d91b9de04dc11a00c619333d2fafc561f3a/geteventstore-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "327d673306eaa998ae111d8d570f94cb", "sha256": "8b374088a1533c5868d4361d018331b959cba49ce8c88bf37eb00b21006efec4" }, "downloads": -1, "filename": "geteventstore-0.0.4.tar.gz", "has_sig": false, "md5_digest": "327d673306eaa998ae111d8d570f94cb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4111, "upload_time": "2018-07-26T16:18:52", "url": "https://files.pythonhosted.org/packages/7d/05/097ac82d2755d1f4574b101ce88e3aa6ac186d05b2aee428b2d6a67ebd44/geteventstore-0.0.4.tar.gz" } ] }