<commit_before># pyflapjackevents


pyflapjackevents is a small library that serializes [Flapjack](flapjack|http://flapjack.io/) events as described in it's own [Data structures](http://flapjack.io/docs/1.0/development/DATA_STRUCTURES/). It's main intention is to allow sending monitor events to flapjack from python programs.


An example:

```
server = redis.Redis(host='localhost', port='6380')
    sink = FlapjackEventSink(server, 'events')
    event = FlapjackEvent(
        'test-entity',
        'test-check',
        FlapjackEvent.EVENT_SERVICE,
        FlapjackEvent.STATE_OK,
        summary = 'test-summary',
        details = 'test-details',
    )
    sink.send(event)
```


This would serialize the event and send it to the appropriate Redis channel for flapjack consumption.

## Installation

Just do:

```
pip install pyflapjackevents 
```

or installing it from source:

```
git clone https://github.com/tuenti/pyflapjackevents.git
cd pyflapjackevents
python setup.py install
```
## Requirements

There're no special requirements for this library.

## Credits & Contact

pyflapjackevents was created by Tuenti Technologies S.L.. You can follow Tuenti engineering team on Twitter @tuentieng.

## License
pyflapjackevents is available under the Apache License, Version 2.0. See LICENSE file for more info.<commit_msg>Update documentation.<commit_after>pyflapjackevents
================

pyflapjackevents is a small library that serializes `flapjack <http://flapjack.io>`_ events as described in it's own `Data structures <http://flapjack.io/docs/1.0/development/DATA_STRUCTURES/>`_. It's main intention is to allow sending monitor events to flapjack from python programs.


An example:

.. code-block:: python

    server = redis.Redis(host='localhost', port='6380')
    sink = FlapjackEventSink(server, 'events')
    event = FlapjackEvent(
        'test-entity',
        'test-check',
        FlapjackEvent.EVENT_SERVICE,
        FlapjackEvent.STATE_OK,
        summary = 'test-summary',
        details = 'test-details',
    )
    sink.send(event)



This would serialize the event and send it to the appropriate Redis channel for flapjack consumption.

Installation
------------
Just do::

    pip install pyflapjackevents 


or installing it from source::

    git clone https://github.com/tuenti/pyflapjackevents.git
    cd pyflapjackevents
    python setup.py install

Requirements
------------
There're no special requirements for this library.

Credits & Contact
-----------------
pyflapjackevents was created by Tuenti Technologies S.L.. You can follow Tuenti engineering team on Twitter `@tuentieng <https://twitter.com/tuentieng>`_.

License
-------
pyflapjackevents is available under the Apache License, Version 2.0. See LICENSE file for more info.
{'fraction_non_alphanumeric': 0.11027027027027027, 'fraction_numerical': 0.005765765765765766, 'mean_word_length': 3.5884297520661157, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 3, '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': '7673094', 'n_tokens_mistral': 878, 'n_tokens_neox': 804, 'n_words': 260}