Skip to main content

Small extension for Flask to make using Gravatar easy

Project description

Flask Gravatar
==============

.. module:: flaskext.gravatar

This is small and simple integration `gravatar`_ into `flask`_.

.. _flask: http://flask.pocoo.org
.. _gravatar: http://gravatar.com

Installation
------------

Install the extension with one of the following commands:
::

$ easy_install Flask-Gravatar

or alternatively if you have pip installed:
::

$ pip install Flask-Gravatar

How to Use
----------

Initialize with flask application and default parameters:
::

gravatar = Gravatar(app,
size=100,
rating='g',
default='retro',
force_default=False,
force_lower=False)

Then in your template:
::

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

Bigger and adult:
::

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

Patameters
++++++++++

All parameters are described in `gravatar documentation`_.

.. _gravatar documentation: http://gravatar.com/site/implement/images

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.2.1.tar.bz2 (9.5 kB view details)

Uploaded Source

File details

Details for the file Flask-Gravatar-0.2.1.tar.bz2.

File metadata

File hashes

Hashes for Flask-Gravatar-0.2.1.tar.bz2
Algorithm Hash digest
SHA256 76d9d5a73848148e6d8a60209fe78a81ab814302e3fc62ab8efba41f72d37356
MD5 49645d1ed694e363bb894fd0a985cf3a
BLAKE2b-256 4a9307abd7fa33a2c384779eab197c007553b08dece13a7b0c9c7ecd60e57baa

See more details on using hashes here.

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