Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zzzsochi/flask-gravatar
Small and simple gravatar usage in Flask.
https://github.com/zzzsochi/flask-gravatar
avatar avatar-generator avatar-service flask gravatar python
Last synced: 7 days ago
JSON representation
Small and simple gravatar usage in Flask.
- Host: GitHub
- URL: https://github.com/zzzsochi/flask-gravatar
- Owner: zzzsochi
- License: other
- Created: 2011-01-08T14:28:13.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2024-02-01T14:41:09.000Z (11 months ago)
- Last Synced: 2024-12-07T17:51:28.334Z (16 days ago)
- Topics: avatar, avatar-generator, avatar-service, flask, gravatar, python
- Language: Python
- Homepage:
- Size: 69.3 KB
- Stars: 83
- Watchers: 4
- Forks: 25
- Open Issues: 7
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGES.rst
- Contributing: CONTRIBUTING.rst
- License: LICENSE
- Authors: AUTHORS
Awesome Lists containing this project
README
================
Flask Gravatar
================.. image:: https://img.shields.io/travis/zzzsochi/Flask-Gravatar.svg
:target: https://travis-ci.org/zzzsochi/Flask-Gravatar.. image:: https://img.shields.io/coveralls/zzzsochi/Flask-Gravatar.svg
:target: https://coveralls.io/r/zzzsochi/Flask-Gravatar.. image:: https://img.shields.io/github/tag/zzzsochi/Flask-Gravatar.svg
:target: https://github.com/zzzsochi/Flask-Gravatar/releases.. image:: https://img.shields.io/pypi/dm/Flask-Gravatar.svg
:target: https://pypi.python.org/pypi/Flask-Gravatar.. image:: https://img.shields.io/github/license/zzzsochi/Flask-Gravatar.svg
:target: https://github.com/zzzsochi/Flask-Gravatar/blob/master/LICENSEAbout
=====This is small and simple integration `gravatar`_ into `flask`_.
.. _flask: http://flask.pocoo.org
.. _gravatar: http://gravatar.comInstallation
============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: ::
{{ '[email protected]' | gravatar }}
Bigger and adult: ::
{{ '[email protected]' | gravatar(size=200, rating='x') }}
Parameters
----------All parameters are described in `gravatar documentation`_.
.. _gravatar documentation: http://gravatar.com/site/implement/images
Testing
=======
Running the test suite is as simple as: ::python setup.py test
or, to also show code coverage: ::
./run-tests.sh