libgravatar
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 requires 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()
'https://www.gravatar.com/avatar/0bc83cb571cd1c50ba6f3e8a78ef1346'
Getting the profile URL:
from libgravatar import Gravatar
g = Gravatar('myemailaddress@example.com')
g.get_profile()
'https://www.gravatar.com/0bc83cb571cd1c50ba6f3e8a78ef1346'
Gravatar XML-RPC API
The XML-RPC API requires authentication.
You can use your Gravatar.com’s email and password:
from libgravatar import GravatarXMLRPC
g = GravatarXMLRPC('name@example.com', password='1234')
g.test() # test the API
or if you have an account at Wordpress.com you can use your email and API key. You can find your API key at https://apikey.wordpress.com/ just be sure to pass to the function your email instead of your username:
from libgravatar import GravatarXMLRPC
g = GravatarXMLRPC('name@example.com', apikey='1234')
g.test() # test the API
Development
To contribute to this project or to test this library locally you’ll need to install these dependencies:
python3 -m venv venv # for example on a virtual environment
source venv/bin/activate
pip install pytest black
and you can validate your changes running:
pytest --doctest-modules --verbose
black . --check --diff
Metadata
Release files for libgravatar 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| libgravatar-1.0.4.tar.gz | 17.0 kB | Without provenance | Details for libgravatar-1.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| libgravatar-1.0.4-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for libgravatar-1.0.4-py2.py3-none-any.whl |
Total release size: 34.5 kB
Release files / libgravatar-1.0.4.tar.gz
| Download URL | libgravatar-1.0.4.tar.gz |
|---|---|
| Size | 17.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
05cf4f8dfefe995d09078cd3d747c8f04dcf17d6004fc7bb542049a55f2238d9
|
|
BLAKE2b-256 checksum How to use checksums |
c3e73e9c8d596dfad798be22ffa731dfc2ac8b5f72728a4beca56d722c07df6f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.2
|
Release files / libgravatar-1.0.4-py2.py3-none-any.whl
| Download URL | libgravatar-1.0.4-py2.py3-none-any.whl |
|---|---|
| Size | 17.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
f967619b38914e0f941e53387881005e43929814571103f6bbfa2afd75045e20
|
|
BLAKE2b-256 checksum How to use checksums |
7ccc1c5f1d887800035bf0c93f204190ae26f859ab0e00f7ff523324395716b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.2
|
Security for libgravatar 1.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.