This is small and simple integration gravatar into flask.
Flask-Gravatar is on PyPI so all you need is:
pip install Flask-Gravatar
Initialize with flask application and default parameters:
gravatar = Gravatar(app, size=100, rating='g', default='retro', force_default=False, use_ssl=False, base_url=None)
Then in your template:
{{ '[email protected]' | gravatar }}
Bigger and adult:
{{ '[email protected]' | gravatar(size=200, rating='x') }}
All parameters are described in gravatar documentation.
Running the test suite is as simple as:
python setup.py test
or, to also show code coverage:
./run-tests.sh