Skip to main content

The Python Agent for cyberchief-bolt

Project description

logo

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


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)

Uploaded Source

Built Distribution

cyberchief_bolt-0.0.18-py3-none-any.whl (6.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page