<commit_before>Server Side Events (SSE) client for Python
==========================================

A Python client for SSE event sources that seamlessly integrates with
``urllib3`` and ``requests``.

Usage
-----

.. code:: python

    import pprint
    import urllib3
    import sseclient

    http = urllib3.PoolManager()
    response = http.request('GET', 'http://domain.com/events')
    client = sseclient.SSEClient(response.stream())
    for event in client.events():
        pprint.pprint(json.loads(event.data))

Resources
=========

-  http://www.w3.org/TR/2009/WD-eventsource-20091029/<commit_msg>Document need for preload_content=False, no .stream()<commit_after>Server Side Events (SSE) client for Python
==========================================

A Python client for SSE event sources that seamlessly integrates with
``urllib3`` and ``requests``.

Usage
-----

.. code:: python

    import pprint
    import urllib3
    import sseclient

    http = urllib3.PoolManager()
    response = http.request('GET', 'http://domain.com/events',
                            preload_content=False)
    client = sseclient.SSEClient(response)
    for event in client.events():
        pprint.pprint(json.loads(event.data))

Resources
=========

-  http://www.w3.org/TR/2009/WD-eventsource-20091029/
{'fraction_non_alphanumeric': 0.19106317411402157, 'fraction_numerical': 0.02465331278890601, 'mean_word_length': 3.5261324041811846, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1290025', 'n_tokens_mistral': 412, 'n_tokens_neox': 387, 'n_words': 93}