<commit_before>EventSource Parser
==================

A framework agnostic EventSource Parser.

    >>> source =
    """
    id: 1
    event: chat
    data: hey, how are you?

    id: 2
    event: chat
    data: fine, thanks you

    :ping
    """
    >>> from eventsource_parser import parse
    >>> event, rest = parse(source)
    >>> event
    Event(1, 'chat', 'hey, how are you?')
    >>> rest
    "id: 2\nevent: chat\ndata: fine, thanks you\n\n:ping\n"
    >>> event, rest = parse(rest)
    >>> event
    Event(2, 'chat', 'fine, thanks you')
    >>> rest<commit_msg>README: fix a typo<commit_after>EventSource Parser
==================

A framework agnostic EventSource Parser.

    >>> source =
    """
    id: 1
    event: chat
    data: hey, how are you?

    id: 2
    event: chat
    data: fine, thank you

    :ping
    """
    >>> from eventsource_parser import parse
    >>> event, rest = parse(source)
    >>> event
    Event(1, 'chat', 'hey, how are you?')
    >>> rest
    "id: 2\nevent: chat\ndata: fine, thank you\n\n:ping\n"
    >>> event, rest = parse(rest)
    >>> event
    Event(2, 'chat', 'fine, thank you')
    >>> rest
{'fraction_non_alphanumeric': 0.1791958041958042, 'fraction_numerical': 0.008741258741258742, 'mean_word_length': 2.5339506172839505, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 51, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '1576432', 'n_tokens_mistral': 399, 'n_tokens_neox': 380, 'n_words': 116}