Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Teemu/flask-color
flask-color is an extension for Flask that improves the built-in web server with colors when debugging
https://github.com/Teemu/flask-color
Last synced: about 2 months ago
JSON representation
flask-color is an extension for Flask that improves the built-in web server with colors when debugging
- Host: GitHub
- URL: https://github.com/Teemu/flask-color
- Owner: Teemu
- License: mit
- Created: 2014-01-28T01:00:53.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-08-12T16:55:45.000Z (about 10 years ago)
- Last Synced: 2024-07-24T13:59:53.152Z (2 months ago)
- Language: Python
- Homepage:
- Size: 198 KB
- Stars: 25
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Flask-Color
===========![](http://i.imgur.com/u5tLLho.png)
flask-color is an extension for Flask that improves the built-in web server with colors when debugging. Unnecessary clutter such as time or IP are hidden.
Installing
----------You can install this using pip.
````$ pip install flask-color````
How to use
----------There's an example of use in sample.py. Add two lines to your code:
```python
# Import this extension
import flask.ext.color# Initialize extension with your app.
flask.ext.color.init_app(app)
```Flask configuration *DEBUG* must be True for this extension to function. You can override this by setting *COLOR_ALWAYS_ON* true.
Configuration
-------------- *COLOR_ALWAYS_ON*: Force extension on even if not in DEBUG mode
- *COLOR_PATTERN_GRAY*: Regular expression that matches static file requests (these requests are marked with gray color)
- *COLOR_PATTERN_HIDE*: Hides requests that match this regular expression.