Skip to main content

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

Project description

https://img.shields.io/travis/zzzsochi/Flask-Gravatar.svg https://img.shields.io/coveralls/zzzsochi/Flask-Gravatar.svg https://img.shields.io/github/tag/zzzsochi/Flask-Gravatar.svg https://img.shields.io/pypi/dm/Flask-Gravatar.svg https://img.shields.io/github/license/zzzsochi/Flask-Gravatar.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

Changes

Version 0.5.0 (released 2018-01-05)

  • Try to read configuration values from application config if a context is available otherwise return an instance config or extension default. (pull #23)

  • Package refresh - testing Python 3.6, fixed links, and much more. (pull #22)

Version 0.4.2 (released 2015-03-23)

  • Set use_ssl default value according to request protocol. (pull #14)

  • Improved documentation typo fixes. (pull #13 #18)

  • Migration from flaskext.gravatar to flask_gravatar. (pull #11 #12)

Version 0.4.1 (released 2013-11-07)

  • Added Python 3 support. (pull #9)

Version 0.4.0 (released 2013-08-09)

  • Added custom url support. (pull #7)

  • Use setuptools. (pull #6)

Version 0.3.0 (released 2013-03-23)

  • Enabled registering multiple times in one process.

Version 0.2.4 (released 2012-11-28)

  • Added init_app method.

  • Fixed various bugs.

Version 0.2.3 (released 2011-11-29)

  • Added HTTPS suppport.

Version 0.2.2 (released 2011-01-10)

  • First public release.

  • It works.

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.3.dev20150324.tar.gz (17.3 kB view details)

Uploaded Source

Built Distribution

Flask_Gravatar-0.4.3.dev20150324-py2.py3-none-any.whl (7.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file Flask-Gravatar-0.4.3.dev20150324.tar.gz.

File metadata

File hashes

Hashes for Flask-Gravatar-0.4.3.dev20150324.tar.gz
Algorithm Hash digest
SHA256 d36809c48edb689f5af1bc40a72c49b603f8facb55563955224ff710978750dc
MD5 b0d5af9eb3e110fb18dcf84d864b0128
BLAKE2b-256 fb6c2b79b173489fc3c9aee80eddb551f344ae6a9f5c6c1dfe70d5349e410068

See more details on using hashes here.

File details

Details for the file Flask_Gravatar-0.4.3.dev20150324-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for Flask_Gravatar-0.4.3.dev20150324-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 cb4f64477e1d9ef6d551426ca21197047f42bcc7c232f06d9a9ed795c8d53c3b
MD5 8501ca784a566f48c3a2ff29b236e55e
BLAKE2b-256 4995e77b5d355121ee8e2ee27309c3f522e9d63484b493b19758c08b097d5845

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