Skip to main content

Small extension for Flask to make usage of Gravatar service easy.

Project description

https://travis-ci.org/zzzsochi/Flask-Gravatar.svg?branch=master https://coveralls.io/repos/zzzsochi/Flask-Gravatar/badge.svg?branch=master https://pypip.in/v/Flask-Gravatar/badge.svg https://pypip.in/d/Flask-Gravatar/badge.svg

About

This is small and simple integration gravatar into flask.

Installation

Flask-Gravatar is on PyPI so all you need is:

pip install Flask-Gravatar

Documentation

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:

{{ 'zzz.sochi@gmail.com' | gravatar }}

Bigger and adult:

{{ 'zzz.sochi@gmail.com' | gravatar(size=200, rating='x') }}

Parameters

All parameters are described in gravatar documentation.

Testing

Running the test suite is as simple as:

python setup.py test

or, to also show code coverage:

./run-tests.sh

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-Gravatar-0.4.2.tar.gz (14.2 kB view hashes)

Uploaded source

Built Distribution

Flask_Gravatar-0.4.2-py2.py3-none-any.whl (5.6 kB view hashes)

Uploaded 2 7

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page