aiohttp-sse-client2


Nameaiohttp-sse-client2 JSON
Version 0.3.0 PyPI version JSON
download
home_pagehttps://github.com/JelleZijlstra/aiohttp-sse-client2
SummaryA Server-Sent Event python client base on aiohttp
upload_time2023-02-07 11:20:43
maintainer
docs_urlNone
authorJason Hu
requires_python
licenseApache License 2.0
keywords aiohttp_sse_client
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            This is a fork of the `aiohttp-sse-client <https://github.com/rtfol/aiohttp-sse-client>`__
project by Jason Hu. The motivations for the fork are:

* Better error messages when the request fails (`#190 <https://github.com/rtfol/aiohttp-sse-client>`__)
* Update the library to support new Python versions

The fork will be retired if the upstream package comes back alive.

Fork changelog
--------------

* 0.3.0 (February 7, 2023)
  * Drop support for Python 3.6
  * Support Python 3.10 and 3.11
  * Include response body in exception for non-200 response codes

Original README follows:

==========
SSE Client
==========


.. image:: https://img.shields.io/pypi/v/aiohttp_sse_client.svg
        :target: https://pypi.python.org/pypi/aiohttp_sse_client

.. image:: https://img.shields.io/travis/com/rtfol/aiohttp-sse-client.svg
        :target: https://travis-ci.com/rtfol/aiohttp-sse-client

.. image:: https://readthedocs.org/projects/aiohttp-sse-client/badge/?version=latest
        :target: https://aiohttp-sse-client.readthedocs.io/en/latest/?badge=latest
        :alt: Documentation Status

.. image:: https://pyup.io/repos/github/rtfol/aiohttp-sse-client/shield.svg
     :target: https://pyup.io/repos/github/rtfol/aiohttp-sse-client/
     :alt: Updates


A Server-Sent Event python client base on aiohttp, provides a simple interface to process `Server-Sent Event <https://www.w3.org/TR/eventsource>`_.

* Free software: Apache Software License 2.0
* Documentation: https://aiohttp-sse-client.readthedocs.io.


Features
--------

* Full asyncio support
* Easy to integrate with other aiohttp based project
* Auto-reconnect for network issue
* Support python 3.6 and above

Usage
--------
.. code-block:: python

    from aiohttp_sse_client2 import client as sse_client

    async with sse_client.EventSource(
        'https://stream.wikimedia.org/v2/stream/recentchange'
    ) as event_source:
        try:
            async for event in event_source:
                print(event)
        except ConnectionError:
            pass

Credits
-------

This project was inspired by `aiosseclient <https://github.com/ebraminio/aiosseclient>`_,
`sseclient <https://github.com/btubbs/sseclient>`_, and `sseclient-py <https://github.com/mpetazzoni/sseclient>`_.

This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage


=======
History
=======

0.2.1 (2021-02-27)
------------------

* Allow sending request with different HTTP methods (by @paulefoe)
* Migrate to GitHub Actions

0.2.0 (2020-10-20)
------------------

**Breaking Changes**

* Drop Python 3.5 support
* Add Python 3.8 support

**Non functional changes**

* Clarify the license (Apache Software License 2.0), thanks @fabaff
* Update dependency packages


0.1.7 (2020-03-30)
------------------

* Allow passing kwargs without specifying headers

0.1.6 (2019-08-06)
------------------

* Fix Unicode NULL handling in event id field

0.1.5 (2019-08-06)
------------------

* Fix last id reconnection (by @Ronserruya)

0.1.4 (2018-10-04)
------------------

* Switch to Apache Software License 2.0

0.1.3 (2018-10-03)
------------------

* Change the error handling, better fit the live specification.

0.1.2 (2018-10-03)
------------------

* Implement auto-reconnect feature.

0.1.1 (2018-10-02)
------------------

* First release on PyPI.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/JelleZijlstra/aiohttp-sse-client2",
    "name": "aiohttp-sse-client2",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "aiohttp_sse_client",
    "author": "Jason Hu",
    "author_email": "awaregit@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/63/e5/d02277f6b7b7529ff67a476400a81f794410d068c5699750163a903b83e6/aiohttp-sse-client2-0.3.0.tar.gz",
    "platform": null,
    "description": "This is a fork of the `aiohttp-sse-client <https://github.com/rtfol/aiohttp-sse-client>`__\nproject by Jason Hu. The motivations for the fork are:\n\n* Better error messages when the request fails (`#190 <https://github.com/rtfol/aiohttp-sse-client>`__)\n* Update the library to support new Python versions\n\nThe fork will be retired if the upstream package comes back alive.\n\nFork changelog\n--------------\n\n* 0.3.0 (February 7, 2023)\n  * Drop support for Python 3.6\n  * Support Python 3.10 and 3.11\n  * Include response body in exception for non-200 response codes\n\nOriginal README follows:\n\n==========\nSSE Client\n==========\n\n\n.. image:: https://img.shields.io/pypi/v/aiohttp_sse_client.svg\n        :target: https://pypi.python.org/pypi/aiohttp_sse_client\n\n.. image:: https://img.shields.io/travis/com/rtfol/aiohttp-sse-client.svg\n        :target: https://travis-ci.com/rtfol/aiohttp-sse-client\n\n.. image:: https://readthedocs.org/projects/aiohttp-sse-client/badge/?version=latest\n        :target: https://aiohttp-sse-client.readthedocs.io/en/latest/?badge=latest\n        :alt: Documentation Status\n\n.. image:: https://pyup.io/repos/github/rtfol/aiohttp-sse-client/shield.svg\n     :target: https://pyup.io/repos/github/rtfol/aiohttp-sse-client/\n     :alt: Updates\n\n\nA Server-Sent Event python client base on aiohttp, provides a simple interface to process `Server-Sent Event <https://www.w3.org/TR/eventsource>`_.\n\n* Free software: Apache Software License 2.0\n* Documentation: https://aiohttp-sse-client.readthedocs.io.\n\n\nFeatures\n--------\n\n* Full asyncio support\n* Easy to integrate with other aiohttp based project\n* Auto-reconnect for network issue\n* Support python 3.6 and above\n\nUsage\n--------\n.. code-block:: python\n\n    from aiohttp_sse_client2 import client as sse_client\n\n    async with sse_client.EventSource(\n        'https://stream.wikimedia.org/v2/stream/recentchange'\n    ) as event_source:\n        try:\n            async for event in event_source:\n                print(event)\n        except ConnectionError:\n            pass\n\nCredits\n-------\n\nThis project was inspired by `aiosseclient <https://github.com/ebraminio/aiosseclient>`_,\n`sseclient <https://github.com/btubbs/sseclient>`_, and `sseclient-py <https://github.com/mpetazzoni/sseclient>`_.\n\nThis package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n\n\n=======\nHistory\n=======\n\n0.2.1 (2021-02-27)\n------------------\n\n* Allow sending request with different HTTP methods (by @paulefoe)\n* Migrate to GitHub Actions\n\n0.2.0 (2020-10-20)\n------------------\n\n**Breaking Changes**\n\n* Drop Python 3.5 support\n* Add Python 3.8 support\n\n**Non functional changes**\n\n* Clarify the license (Apache Software License 2.0), thanks @fabaff\n* Update dependency packages\n\n\n0.1.7 (2020-03-30)\n------------------\n\n* Allow passing kwargs without specifying headers\n\n0.1.6 (2019-08-06)\n------------------\n\n* Fix Unicode NULL handling in event id field\n\n0.1.5 (2019-08-06)\n------------------\n\n* Fix last id reconnection (by @Ronserruya)\n\n0.1.4 (2018-10-04)\n------------------\n\n* Switch to Apache Software License 2.0\n\n0.1.3 (2018-10-03)\n------------------\n\n* Change the error handling, better fit the live specification.\n\n0.1.2 (2018-10-03)\n------------------\n\n* Implement auto-reconnect feature.\n\n0.1.1 (2018-10-02)\n------------------\n\n* First release on PyPI.\n",
    "bugtrack_url": null,
    "license": "Apache License 2.0",
    "summary": "A Server-Sent Event python client base on aiohttp",
    "version": "0.3.0",
    "split_keywords": [
        "aiohttp_sse_client"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b97b6bd2f3767df21e44e77356e750753b7eab742586182deafe6d90363a9371",
                "md5": "a379755a9bc04e6527acef5278b7660c",
                "sha256": "1921bfe488667bf70651a38f54363fdd0c5f0d7021010e632bf80754c6850b25"
            },
            "downloads": -1,
            "filename": "aiohttp_sse_client2-0.3.0-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a379755a9bc04e6527acef5278b7660c",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 7322,
            "upload_time": "2023-02-07T11:20:41",
            "upload_time_iso_8601": "2023-02-07T11:20:41.953427Z",
            "url": "https://files.pythonhosted.org/packages/b9/7b/6bd2f3767df21e44e77356e750753b7eab742586182deafe6d90363a9371/aiohttp_sse_client2-0.3.0-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "63e5d02277f6b7b7529ff67a476400a81f794410d068c5699750163a903b83e6",
                "md5": "c2197aa741270f3622eefefa134a86b0",
                "sha256": "5cdd33fc0d034aea339e190726bb918bc61fd3424c7ab528d07b1d60790a979f"
            },
            "downloads": -1,
            "filename": "aiohttp-sse-client2-0.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "c2197aa741270f3622eefefa134a86b0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 15027,
            "upload_time": "2023-02-07T11:20:43",
            "upload_time_iso_8601": "2023-02-07T11:20:43.633490Z",
            "url": "https://files.pythonhosted.org/packages/63/e5/d02277f6b7b7529ff67a476400a81f794410d068c5699750163a903b83e6/aiohttp-sse-client2-0.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-02-07 11:20:43",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "JelleZijlstra",
    "github_project": "aiohttp-sse-client2",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "aiohttp-sse-client2"
}
        
Elapsed time: 0.05097s