Skip to content
Snippets Groups Projects
Select Git revision
  • master default protected
  • pylibravatar-1.7
  • pylibravatar-1.6
3 results

pylibravatar

  • Clone with SSH
  • Clone with HTTPS
  • # pyLibravatar
    
    PyLibravatar is an easy way to make use of the federated [Libravatar](http://www.libravatar.org)
    avatar hosting service from within your Python applications.
    
    See the [project page](https://launchpad.net/pylibravatar) for the bug tracker and downloads.
    
    ## Installation
    
    To install using pip, simply do this:
    
        $ pip install pyLibravatar
    
    ## Usage
    
    To generate the correct avatar URL based on someone's email address, use the
    following:
    
        >>> from libravatar import libravatar_url
        >>> url = libravatar_url(email = 'person@example.com')
        >>> print '<img src="' + url + '">'
    
    Here are other options you can provide:
    
        >>> url = libravatar_url(openid = 'http://example.org/id/Bob', https = True, size = 96, default = 'mm')
    
    See the [Libravatar documentation](http://wiki.libravatar.org/api) for more
    information on the special values for the "default" parameter.