The Python Agent for cyberchief-bolt
Project description
Cyberchief Bolt API Security
Secure Your API.
Installation
Currently Cyberchief Bolt's Python Agent supports 2 servers:
- Django
- Flask
It can be installed from pypi
by running :
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:
MIDDLEWARE = [
...,
"bolt.django.BoltDjango",
]
and configuring a BOLT_CONFIG
attribute in the projects settings.py
like this :
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:
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.
BoltFlask(app, "<YOUR_BOLT_COLLECTOR_URL>", "<YOUR_BOLT_API_KEY>")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cyberchief-bolt-0.0.18.tar.gz
(4.8 kB
view hashes)
Built Distribution
Close
Hashes for cyberchief_bolt-0.0.18-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e2f99ccd170c081bc24846589e70a46d6d6be8d0ee77b94d0a9e2d544fc90b6 |
|
MD5 | 4cf622c461861213e9472adb0d627071 |
|
BLAKE2b-256 | 237f3aa91e22af4c2404d81ec069f01a8bcf85e0d9cc749b3237586b5d8e03e4 |