<commit_before>## Stream Django
[![build](https://github.com/GetStream/stream-django/workflows/build/badge.svg)](https://github.com/GetStream/stream-django/actions) [![PyPI version](https://badge.fury.io/py/stream-django.svg)](http://badge.fury.io/py/stream-django)

[stream-django](https://github.com/GetStream/stream-django) is a Django client for [Stream](https://getstream.io/), it supports Django from 1.11 up to and including 4.0 using Python 2.7 and 3.4, 3.5, 3.6+.

You can sign up for a Stream account at https://getstream.io/get_started.

Note there is also a lower level [Python - Stream integration](https://github.com/getstream/stream-python) library which is suitable for all Python applications.

### Build activity streams & news feeds

<p align="center">
  <img src="https://dvqg2dogggmn6.cloudfront.net/images/mood-home.png" alt="Examples of what you can build" title="What you can build"/>
</p>

You can build:

* Activity streams such as seen on Github
* A twitter style newsfeed
* A feed like instagram/ pinterest
* Facebook style newsfeeds
* A notification system

### Example apps

You can check out our example apps built using this library (you can deploy them directly to Heroku with 1 click):

* [Pinterest-like example app](https://github.com/GetStream/Stream-Example-Py)
* [Twitter for scientists example app](https://github.com/GetStream/django_twitter)

### Table of Contents
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

- [What can you build?](#what-can-you-build)
- [Demo](#demo)
- [Installation](#installation)
- [Model integration](#model-integration)
- [Feed manager](#feed-manager)
- [Showing the newsfeed](#showing-the-newsfeed)
  - [Activity enrichment](#activity-enrichment)
  - [Templating](#templating)
- [Settings](#settings)
- [Temporarily disabling the signals](#temporarily-disabling-the-signals)
- [Customizing enrichment](#customizing-enrichment)
- [Low level APIs access](#low-level-apis-access)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

### Installation

Install stream_django package with pip:

```pip install stream_django```

add stream_django to your ```INSTALLED_APPS```

```python
INSTALLED_APPS = [
    ...
    'stream_django'
]

STREAM_API_KEY = 'my_api_key'
STREAM_API_SECRET = 'my_api_secret_key'

```

Login with Github on getstream.io and add
```STREAM_API_KEY``` and ```STREAM_API_SECRET``` to your Django settings module (you can find them in the dashboard).

### Model integration

Stream Django can automatically publish new activities to your feed. Simple mixin the Activity class on the models you want to publish.
<commit_msg>docs(readme): add chat notice (#114)<commit_after>## Stream Django <!-- omit in toc -->
[![build](https://github.com/GetStream/stream-django/workflows/build/badge.svg)](https://github.com/GetStream/stream-django/actions) [![PyPI version](https://badge.fury.io/py/stream-django.svg)](http://badge.fury.io/py/stream-django)

[stream-django](https://github.com/GetStream/stream-django) is a Django client for [Stream](https://getstream.io/), it supports Django from 1.11 up to and including 4.0 using Python 2.7 and 3.4, 3.5, 3.6+.

You can sign up for a Stream account at https://getstream.io/get_started.

Note there is also a lower level [Python - Stream integration](https://github.com/getstream/stream-python) library which is suitable for all Python applications.

> 💡 This is a library for the **Feeds** product. The Chat SDKs can be found [here](https://getstream.io/chat/docs/).

### Build activity streams & news feeds

<p align="center">
  <img src="https://dvqg2dogggmn6.cloudfront.net/images/mood-home.png" alt="Examples of what you can build" title="What you can build"/>
</p>

You can build:

* Activity streams such as seen on Github
* A twitter style newsfeed
* A feed like instagram/ pinterest
* Facebook style newsfeeds
* A notification system

### Example apps

You can check out our example apps built using this library (you can deploy them directly to Heroku with 1 click):

* [Pinterest-like example app](https://github.com/GetStream/Stream-Example-Py)
* [Twitter for scientists example app](https://github.com/GetStream/django_twitter)

### Table of Contents
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

- [Build activity streams & news feeds](#build-activity-streams--news-feeds)
- [Example apps](#example-apps)
- [Table of Contents](#table-of-contents)
- [Installation](#installation)
- [Model integration](#model-integration)
  - [Activity fields](#activity-fields)
  - [Activity extra data](#activity-extra-data)
- [Feed manager](#feed-manager)
  - [Feeds bundled with feed_manager](#feeds-bundled-with-feed_manager)
    - [User feed:](#user-feed)
    - [News feeds:](#news-feeds)
    - [Notification feed:](#notification-feed)
  - [Follow a feed](#follow-a-feed)
- [Showing the newsfeed](#showing-the-newsfeed)
  - [Activity enrichment](#activity-enrichment)
  - [Templating](#templating)
- [Settings](#settings)
- [Temporarily disabling the signals](#temporarily-disabling-the-signals)
- [Customizing enrichment](#customizing-enrichment)
  - [Enrich extra fields](#enrich-extra-fields)
  - [Change how models are retrieved](#change-how-models-are-retrieved)
  - [Preload related data](#preload-related-data)
- [Full documentation and Low level APIs access](#full-documentation-and-low-level-apis-access)
- [Copyright and License Information](#copyright-and-license-information)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

### Installation

Install stream_django package with pip:

```pip install stream_django```

add stream_django to your ```INSTALLED_APPS```

```python
INSTALLED_APPS = [
    ...
    'stream_django'
]

STREAM_API_KEY = 'my_api_key'
STREAM_API_SECRET = 'my_api_secret_key'

```

Login with Github on getstream.io and add
```STREAM_API_KEY``` and ```STREAM_API_SECRET``` to your Django settings module (you can find them in the dashboard).

### Model integration

Stream Django can automatically publish new activities to your feed. Simple mixin the Activity class on the models you want to publish.

{'fraction_non_alphanumeric': 0.13323850165955428, 'fraction_numerical': 0.005531847637110795, 'mean_word_length': 4.700900900900901, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 17, 'https://': 21, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4240415', 'n_tokens_mistral': 2025, 'n_tokens_neox': 1878, 'n_words': 592}