avatars-io-python

Avatar picker and uploader for Avatars.io
Download

avatars-io-python Ranking & Summary

Advertisement

  • Rating:
  • License:
  • MIT/X Consortium Lic...
  • Price:
  • FREE
  • Publisher Name:
  • Alexandre Macabies
  • Publisher web site:
  • https://github.com/Zopieux/

avatars-io-python Tags


avatars-io-python Description

avatars-io-python is a Python avatar picker and uploader module for Avatars.io.UsageYou don't really need the lib if you just want to get user avatars from services such as Twitter of Facebook. Just use the corresponding URL as explained on avatars.io.The lib is useful for custom avatar upload. You need first to register an app on Chute. Then, it's quite straightforward:```python>>> from avatarsio import AvatarsIO>>> avtio = AvatarsIO('my-client-id', 'my-access-token')# With a file name:>>> avtio.upload('kitten.png')"http://avatars.io/4fb6de143d242d44da000001/hashashash"# With a file object:>>> fobj = open('kitten.png', 'rb')>>> avtio.upload(fobj)"http://avatars.io/4fb6de143d242d44da000001/hashashash"# You can give a custom identifer:>>> avtio.upload('kitten.png', 'my-identifier')"http://avatars.io/4fb6de143d242d44da000001/my-identifier"# And obviously, build sersvice avatar URLs:# (but sersiouly, you don't need the lib for that)>>> AvatarsIO.avatar_url('twitter', 'my-identifier')"http://avatars.io/twitter/my-identifier"Product's homepage


avatars-io-python Related Software