Small extension for Flask to make usage of Gravatar service easy.
Project description
About
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
Release history Release notifications | RSS feed
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 details)
Built Distribution
File details
Details for the file Flask-Gravatar-0.4.2.tar.gz
.
File metadata
- Download URL: Flask-Gravatar-0.4.2.tar.gz
- Upload date:
- Size: 14.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 318dd427a21245ace37027246193daad3492e08fcf9999d2fe9addae4c8aacd3 |
|
MD5 | 97a6b4443c487e9dad95ab5ab8566314 |
|
BLAKE2b-256 | b37c162f5b98b88d2088a1a451ae4a354c725c700246ae69cb8cc26175508e65 |
File details
Details for the file Flask_Gravatar-0.4.2-py2.py3-none-any.whl
.
File metadata
- Download URL: Flask_Gravatar-0.4.2-py2.py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 129393458284e9c295f69799b4968581d94e9a08e6fb1c8e06462c43f840d07f |
|
MD5 | 64e1d25406e852f2d16ae20b62d9a767 |
|
BLAKE2b-256 | f0d3a5c764c5a1d66a87f9c973ac3aac8077114f79012f687fde81cc3b05b5d8 |