Metadata-Version: 2.1
Name: cyberchief-bolt
Version: 0.0.18
Summary: The Python Agent for cyberchief-bolt
Home-page: https://www.secure.cyberchief.ai
License: MIT
Project-URL: Documentation, https://github.com/bolttest12345/bolttest
Project-URL: Source Code, https://github.com/bolttest12345/bolttest
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Python: >=3.4
Description-Content-Type: text/markdown
License-File: LICENSE

<p align="center">
  <img alt="logo" src="https://cdn.pixabay.com/photo/2014/04/02/10/21/lightning-303595_640.png" height="80">
  <h1 align="center">Cyberchief Bolt API Security</h1>
  <p align="center">Secure Your API.</p>
</p>

## Installation

Currently Cyberchief Bolt's Python Agent supports 2 servers:

- Django
- Flask

It can be installed from `pypi` by running :

```shell
pip install cyberchief-bolt
```

## Configuration

### Django

Once installed, Bolt's middleware can be added by modifying middlewares list (in the projects `settings.py`) like so:

```python
MIDDLEWARE = [
    ...,
    "bolt.django.BoltDjango",
] 
```

and configuring a `BOLT_CONFIG` attribute in the projects `settings.py` like this :

```python
BOLT_CONFIG = {
    "API_KEY": "<YOUR_BOLT_API_KEY>",
    "BOLT_HOST": "<YOUR_BOLT_COLLECTOR_URL>"
}
```

`BOLT_CONFIG` can take an optional key-value pair representing the max number of workers for communicating with Bolt.

### Flask

Once installed, Bolt middleware can be added simply like:

```python
from flask import Flask

...
from bolt.flask import BoltFlask

app = Flask(__name__)
BoltFlask(app, "<YOUR_BOLT_COLLECTOR_URL>", "<YOUR_BOLT_API_KEY>")
```

The Flask Middleware takes the flask app, Bolt collector url, and the Bolt API Key as parameters.

```python
BoltFlask(app, "<YOUR_BOLT_COLLECTOR_URL>", "<YOUR_BOLT_API_KEY>")
```
