Skip to main content

A library that provides a Python 3 interface for the Gravatar API.

Project description

https://travis-ci.org/pabluk/libgravatar.png?branch=master

A library that provides a Python 3 interface for the Gravatar API. API details: https://en.gravatar.com/site/implement/

Installation

Install via pip:

$ pip install libgravatar

Usage

See more details on https://libgravatar.readthedocs.org/

Gravatar API

Gravatar API require no authentication to get images and profiles URLs.

Getting the user profile image:

from libgravatar import Gravatar
g = Gravatar('myemailaddress@example.com')
g.get_image()
'http://www.gravatar.com/avatar/0bc83cb571cd1c50ba6f3e8a78ef1346'

Getting the profile URL:

from libgravatar import Gravatar
g = Gravatar('myemailaddress@example.com')
g.get_profile()
'http://www.gravatar.com/0bc83cb571cd1c50ba6f3e8a78ef1346'

Gravatar XML-RPC API

The XML-RPC API require authentication.

You can use your Gravatar.com password:

from libgravatar import GravatarXMLRPC
g = GravatarXMLRPC('user@domain', password='1234')
g.test() # test the API

or if you have an account at Wordpress.com you can use your API Key:

from libgravatar import GravatarXMLRPC
g = GravatarXMLRPC('user@domain', apikey='1234')
g.test() # test the API

Author and contributors

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for libgravatar, version 0.2.4
Filename, size File type Python version Upload date Hashes
Filename, size libgravatar-0.2.4-py2.py3-none-any.whl (17.2 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size libgravatar-0.2.4.tar.gz (4.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page