Skip to main content

A Server-Sent Event python client base on aiohttp

Project description

==========
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/rtfol/aiohttp-sse-client.svg
:target: https://travis-ci.org/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: MIT license
* Documentation: https://aiohttp-sse-client.readthedocs.io.


Features
--------

* Full asyncio support
* Easy to integrate with other aiohttp based project
* Auto-reconnect for network issue


Usage
--------
.. code-block:: python
from aiohttp_sse_client 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.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.


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aiohttp-sse-client-0.1.3.tar.gz (14.1 kB view details)

Uploaded Source

Built Distribution

aiohttp_sse_client-0.1.3-py2.py3-none-any.whl (6.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file aiohttp-sse-client-0.1.3.tar.gz.

File metadata

  • Download URL: aiohttp-sse-client-0.1.3.tar.gz
  • Upload date:
  • Size: 14.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.3

File hashes

Hashes for aiohttp-sse-client-0.1.3.tar.gz
Algorithm Hash digest
SHA256 2d542d4e9499fc0b490cc63070a3013e6f2991a065857f8529f53be5809c667a
MD5 eca9f3fd7d72b767e193ba6af71ebfc8
BLAKE2b-256 aaae5574c42be5d066b0b6ad9eeddd2072c1d1af8609c4d7c50bbe8b27358ebd

See more details on using hashes here.

File details

Details for the file aiohttp_sse_client-0.1.3-py2.py3-none-any.whl.

File metadata

  • Download URL: aiohttp_sse_client-0.1.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.3

File hashes

Hashes for aiohttp_sse_client-0.1.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 683fad0b3829c6ec843dcc47b9cda90a9294106042733b54a51d5a210dd6264d
MD5 b685008d0eac2a2aac0008d54c0fbe56
BLAKE2b-256 a9ab6486572500c669c15f9792fbd38c4fd4d19b2cab0f21893e381cc093035d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page