{ "info": { "author": "Brent Tubbs", "author_email": "brent.tubbs@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3" ], "description": "=================\nPython SSE Client\n=================\n\nThis is a Python client library for iterating over http Server Sent Event (SSE)\nstreams (also known as EventSource, after the name of the Javascript interface\ninside browsers). The SSEClient class accepts a url on init, and is then an\niterator over messages coming from the server.\n\nInstallation\n------------\n\nUse pip::\n\n pip install sseclient\n\nUsage\n-----\n\n::\n\n from sseclient import SSEClient\n\n messages = SSEClient('http://mysite.com/sse_stream/')\n for msg in messages:\n do_something_useful(msg)\n\nEach message object will have a 'data' attribute, as well as optional 'event',\n'id', and 'retry' attributes.\n\nOptional init parameters:\n\n- last_id: If provided, this parameter will be sent to the server to tell it to\n return only messages more recent than this ID.\n\n- retry: Number of milliseconds to wait after disconnects before attempting to\n reconnect. The server may change this by including a 'retry' line in a\n message. Retries are handled automatically by the SSEClient object.\n\nYou may also provide any additional keyword arguments supported by the\nRequests_ library, such as a 'headers' dict and a (username, password) tuple\nfor 'auth'.\n\nDevelopment\n-----------\n\nInstall the library in editable mode::\n\n pip install -e .\n\nInstall the test dependencies::\n\n pip install pytest backports.unittest_mock\n\nRun the tests with py.test::\n\n (sseclient)vagrant sseclient $ py.test\n ===================== test session starts ======================\n platform linux2 -- Python 2.7.6 -- py-1.4.30 -- pytest-2.7.2\n rootdir: /vagrant/code/sseclient, inifile: \n plugins: backports.unittest-mock\n collected 11 items \n\n test_sseclient.py ...........\n\n ================== 11 passed in 0.19 seconds ===================\n\nThere are a couple TODO items in the code for getting the implementation\ncompletely in line with the finer points of the SSE spec.\n\nAdditional Resources\n--------------------\n\n- `HTML5Rocks Tutorial`_\n- `Official SSE Spec`_\n\n.. _Requests: http://docs.python-requests.org/en/latest/\n.. _HTML5Rocks Tutorial: https://www.html5rocks.com/en/tutorials/eventsource/basics/\n.. _Official SSE Spec: https://html.spec.whatwg.org/multipage/comms.html#server-sent-events\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/btubbs/sseclient", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "stellar-base-sseclient", "package_url": "https://pypi.org/project/stellar-base-sseclient/", "platform": "", "project_url": "https://pypi.org/project/stellar-base-sseclient/", "project_urls": { "Homepage": "https://github.com/btubbs/sseclient" }, "release_url": "https://pypi.org/project/stellar-base-sseclient/0.0.21/", "requires_dist": null, "requires_python": "", "summary": "Python client library for reading Server Sent Event streams.", "version": "0.0.21" }, "last_serial": 4335239, "releases": { "0.0.21": [ { "comment_text": "", "digests": { "md5": "fd8cf4f91e43ed8b4284b1c7af48c751", "sha256": "2a500f3015dede4e9fac0f9d6d9d85f4fdd7fe1c9c10b2b111a6ae190cc5dc00" }, "downloads": -1, "filename": "stellar-base-sseclient-0.0.21.tar.gz", "has_sig": false, "md5_digest": "fd8cf4f91e43ed8b4284b1c7af48c751", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6651, "upload_time": "2018-10-03T05:13:51", "url": "https://files.pythonhosted.org/packages/86/6a/01a4fba30c15b7713b7169a98251ad66f9babf95cbf7bcfc5d3edce43bf1/stellar-base-sseclient-0.0.21.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fd8cf4f91e43ed8b4284b1c7af48c751", "sha256": "2a500f3015dede4e9fac0f9d6d9d85f4fdd7fe1c9c10b2b111a6ae190cc5dc00" }, "downloads": -1, "filename": "stellar-base-sseclient-0.0.21.tar.gz", "has_sig": false, "md5_digest": "fd8cf4f91e43ed8b4284b1c7af48c751", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6651, "upload_time": "2018-10-03T05:13:51", "url": "https://files.pythonhosted.org/packages/86/6a/01a4fba30c15b7713b7169a98251ad66f9babf95cbf7bcfc5d3edce43bf1/stellar-base-sseclient-0.0.21.tar.gz" } ] }