Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Flask Graylog client

Project Description


Graylog extension for Flask


First, install flask-graylog-bundle using pip:

pip install flask-graylog-bundle

Auth extension

To enable Graylog auth, add a GraylogAuth instance to your code:

from flask import current_app as app
from flask_graylog_bundle.auth import GraylogAuth


auth = GraylogAuth(app)

You can take a look at examples/ for more complete example. Flask’s application factories and blueprints.

It provides a login decorator login_required. To use it just wrap a view function:

def secret_page():
    return jsonify({
        "message": "hello",
        "username": auth.username

Additionnal info can be accessed using g.user (see: Graylog REST API result of GET /users/{username})

NOTE: Graylog tokens are supported, take a look at the Graylog REST API documentation.

API client

To use query Graylog API, add a GraylogAPIServer instance to your code:

from flask import Flask
from flask_graylog_bundle.server import GraylogAPIServer

app = Flask(__name__)
    "GRAYLOG_API_URL": "",
    "GRAYLOG_API_USERNAME": "admin",

api = GraylogAPIServer(app)

You can take a look at examples/ for a complete example.


Apache License 2.0

Release History

Release History

This version
History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
flask-graylog-bundle-0.0.11.tar.gz (5.1 kB) Copy SHA256 Checksum SHA256 Source Aug 1, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting