Skip to content

nukemberg/flask-demo-app

Repository files navigation

Playground application for Riemann workshop

This is a Flask based playground application for a Riemann workshop. The point is to have some application we can experiment on to generate metrics and events for Riemann.

The behaviour of this application can be pretty bad, which is very good for the workshop... don't take it as an example of a well-written application.

Requirements

For python requirements, see the requirements.txt file or just use pip install -r requirements.txt

Other then that the application depends on CouchDB and Riemann.

Configuration

To specify a config file, set the APP_CONFIG_FILE environment variable to name of a python config file. Here is a list of configuration variables and their defaults:

How to run

To start the development server simply run app.py:

python app.py

To run with a production grade WSGI server (e.g. gunicorn):

gunicorn -w 2 -e APP_CONFIG_FILE=config.py -b :8080 app:app

Now go to the swagger UI URL: http://localhost:5000/api/spec.html

Populating the database

In the db folder there is a list file containing insult documents. To populate the database use the import tools:

python db/import.py -u http://localhost:5984/insults db/insults.list

Credits, Projects used

This application uses the following Open Source libraries

About

A Flask demo/playground application for a Riemann workshop

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages