Rich implementation for Flask
Project description
Flask Rich
Implements the Rich programming library with Flask. All features are toggleable, including:
- Better logging
Usage
Import the RichApplication
class.
from flask_rich import RichApplication
from flask import Flask
rich = RichApplication()
app = Flask(__name__)
rich.init_app(app)
# Or
# rich = RichApplication(app)
Class options
app = None
The Flask app that is used. It is optional, but you need to call RichApplication.init_app(app)
later to enabled to library.
app=None, enable_logging: bool=True, logging_markup: bool=True
enable_logging: bool = True
Whether to use Rich's logging handler.
logging_markup: bool = True
Whether to allow Rich's console markup format in logging.
An example of console markup is [blue]Hello[/blue], world!
.
Contributing
PRs are welcome! You can setup your own copy of the source code with:
# Git
git clone https://github.com/BD103/Flask-Rich.git
cd Flask-Rich/
# Poetry
poetry lock
poetry install
poetry shell
You will need Poetry for managing dependencies.
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
Flask-Rich-0.1.0.tar.gz
(2.5 kB
view hashes)
Built Distribution
Close
Hashes for Flask_Rich-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5550d8b45a970b2b44a98f99c0748887d71e0ac01f180483b948f91e5cf55947 |
|
MD5 | 682d6d645d5b37097f22a1682cbbac2b |
|
BLAKE2b-256 | a3f48acbdee10aabcc1b36afb7b57d1c16b9a0978b6e936ffbf129c312051f1d |