<commit_before># Slacksocket

[![Documentation Status](https://img.shields.io/badge/docs-latest-brightgreen.png?style=flat)](http://slacksocket.readthedocs.org/en/latest/client/) [![PyPI version](https://badge.fury.io/py/slacksocket.png)](https://badge.fury.io/py/slacksocket)

Python interface to the Slack Real Time Messaging(RTM) API

## Install

```bash
pip install slacksocket
```

## Usage

### Retrieving events/messages
```python
from slacksocket import SlackSocket

s = SlackSocket('<slack-token>',translate=True) # translate will lookup and replace user and channel IDs with their human-readable names. default true. 

for event in s.events():
    print(event.json)
```

### Sending messages
```python
from slacksocket import SlackSocket

s = SlackSocket('<slack-token>')<commit_msg>revert badges to svg<commit_after># Slacksocket

[![Documentation Status](https://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat)](http://slacksocket.readthedocs.org/en/latest/client/) [![PyPI version](https://badge.fury.io/py/slacksocket.svg)](https://badge.fury.io/py/slacksocket)

Python interface to the Slack Real Time Messaging(RTM) API

## Install

```bash
pip install slacksocket
```

## Usage

### Retrieving events/messages
```python
from slacksocket import SlackSocket

s = SlackSocket('<slack-token>',translate=True) # translate will lookup and replace user and channel IDs with their human-readable names. default true. 

for event in s.events():
    print(event.json)
```

### Sending messages
```python
from slacksocket import SlackSocket

s = SlackSocket('<slack-token>')
{'fraction_non_alphanumeric': 0.14438166980539863, 'fraction_numerical': 0.0, 'mean_word_length': 5.532786885245901, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 6, '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': '276507', 'n_tokens_mistral': 541, 'n_tokens_neox': 508, 'n_words': 120}