Metadata-Version: 2.1
Name: discourse_client_in_disraptor
Version: 0.0.10
Summary: Simple access to the discourse API required to use Disraptor.
Home-page: https://github.com/disraptor/disraptor
Author: Maik Fröbe
Author-email: maik.froebe@uni-weimar.de
Maintainer: Maik Fröbe
Project-URL: Bug Tracker, https://github.com/disraptor/disraptor/issues
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Requires-Dist: requests==2.*,>=2.26
Provides-Extra: test
Requires-Dist: pytest==6.*,>=6.2; extra == "test"
Requires-Dist: pytest-cov==3.*,>=3.0; extra == "test"

# A Lightweight Discourse Client for Disraptor Apps

Simple access to the discourse API required to use [Disraptor](https://www.disraptor.org).

Install via:

```
pip3 install discourse-client-in-disraptor
```

### Usage:

Generate an API key via:

```
from discourse_client_in_disraptor import DiscourseApiClient
client = DiscourseApiClient(url='https://www.tira.io', api_key='<API-KEY>')
client.generate_api_key('<user>', '<description>')
```

Test if a user has access to a group

```
from discourse_client_in_disraptor.discourse_api_client import request_is_in_group
request_is_in_group(request=http_request, group=model, app='chatnoir_chat')
```

