Metadata-Version: 2.1
Name: requests-sse
Version: 0.1.0
Summary: server-sent events python client library based on requests
Home-page: https://github.com/overcat/requests-sse-client
License: Apache-2.0
Keywords: server-sent events,sse,stream,requests
Author: overcat
Author-email: 4catcode@gmail.com
Maintainer: overcat
Maintainer-email: 4catcode@gmail.com
Requires-Python: >=3.8,<4.0
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Dist: requests (>=2.31.0,<3.0.0)
Project-URL: Bug Tracker, https://github.com/overcat/requests-sse-client/issues
Project-URL: Documentation, https://github.com/overcat/requests-sse-client
Project-URL: Repository, https://github.com/overcat/requests-sse-client
Description-Content-Type: text/x-rst

============
requests-sse
============

.. image:: https://img.shields.io/github/actions/workflow/status/overcat/requests-sse/test-deploy.yml?branch=main
    :alt: GitHub Workflow Status
    :target: https://github.com/overcat/requests-sse/actions

.. image:: https://img.shields.io/pypi/v/requests-sse.svg
    :alt: PyPI
    :target: https://pypi.python.org/pypi/requests-sse

.. image:: https://img.shields.io/badge/python-%3E%3D3.8-blue
    :alt: Python - Version
    :target: https://pypi.python.org/pypi/stellar-sdk

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

Installation
------------
.. code-block:: bash

    pip install requests-sse

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

    from requests_sse import EventSource

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

Credits
-------

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