{"id":23963,"library":"libgravatar","title":"LibGravatar","description":"A Python 3 library providing an interface to the Gravatar API. Version 1.0.4 (latest) includes support for FIPS-enabled systems and drops Python 3.6. Release cadence is low (major versions years apart).","status":"active","version":"1.0.4","language":"python","source_language":"en","source_url":"https://github.com/pabluk/libgravatar","tags":["gravatar","avatar","api"],"install":[{"cmd":"pip install libgravatar","lang":"bash","label":"PyPI install"}],"dependencies":[],"imports":[{"note":"Main class for Gravatar API access.","symbol":"Gravatar","correct":"from libgravatar import Gravatar"}],"quickstart":{"code":"from libgravatar import Gravatar\n\ng = Gravatar('user@example.com')\nprint(g.get_image())  # URL of avatar","lang":"python","description":"Create a Gravatar instance with an email and retrieve the avatar image URL. Note: use_ssl defaults to True since v1.0.0."},"warnings":[{"fix":"Explicitly set use_ssl=False if you need HTTP: Gravatar(email, use_ssl=False)","message":"In version 1.0.0, the default for use_ssl changed from False to True. All URLs now use HTTPS by default. If your code relied on HTTP, update accordingly.","severity":"breaking","affected_versions":"<1.0.0"},{"fix":"Upgrade to Python 3.7+ or pin libgravatar to 1.0.3.","message":"Python 3.6 support was removed in version 1.0.4. If you are on Python 3.6, you must stay on an older version or upgrade Python.","severity":"deprecated","affected_versions":">=1.0.4"},{"fix":"Use requests.get(g.get_image()) to get the actual image data.","message":"The get_image() method returns a URL string, not the image binary. To download the image, you need an HTTP request.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run: pip install libgravatar","cause":"Library not installed or installed under a different name (e.g., gravatar).","error":"ModuleNotFoundError: No module named 'libgravatar'"},{"fix":"Use g.get_image() (no underscore separation).","cause":"The method may have been renamed or not exist in older versions. The correct method is get_image().","error":"AttributeError: 'Gravatar' object has no attribute 'get_image'"},{"fix":"Check the email string for typos. Ensure it contains '@' and a valid domain.","cause":"The email provided fails basic validation (e.g., missing @).","error":"libgravatar.GravatarError: invalid email address"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}