libgravatar


Namelibgravatar JSON
Version 1.0.3 PyPI version JSON
download
home_pagehttps://github.com/pabluk/libgravatar
SummaryA library that provides a Python 3 interface for the Gravatar API.
upload_time2022-12-04 20:03:59
maintainer
docs_urlNone
authorPablo Seminario
requires_python
licenseGNU General Public License v3 (GPLv3)
keywords gravatar
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ===========
libgravatar
===========


.. image:: https://github.com/pabluk/libgravatar/actions/workflows/python-package.yml/badge.svg
        :target: https://github.com/pabluk/libgravatar/actions/workflows/python-package.yml

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:

.. code-block:: python

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

Getting the profile URL:

.. code-block:: python

    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:

.. code-block:: python

    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:

.. code-block:: python

    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:

.. code-block:: shell

    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:

.. code-block:: shell

    pytest --doctest-modules --verbose
    black . --check --diff


Author and contributors
-----------------------

* Pablo Seminario (`@pabluk <https://github.com/pabluk>`_)
* Caleb FANGMEIER (`@cfangmeier <https://github.com/cfangmeier>`_)
* Rarm NAGALINGAM (`@snowjet <https://github.com/snowjet/>`_)
* Manan (`@mentix02 <https://github.com/mentix02/>`_)
* Gareth Simpson (`@xurble <https://github.com/xurble/>`_)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/pabluk/libgravatar",
    "name": "libgravatar",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "gravatar",
    "author": "Pablo Seminario",
    "author_email": "pablo@seminar.io",
    "download_url": "https://files.pythonhosted.org/packages/d3/23/2331ed38d423e73aef8ceb0e3b70ba09904cf7f1918a7d25a72c3d902fd1/libgravatar-1.0.3.tar.gz",
    "platform": null,
    "description": "===========\nlibgravatar\n===========\n\n\n.. image:: https://github.com/pabluk/libgravatar/actions/workflows/python-package.yml/badge.svg\n        :target: https://github.com/pabluk/libgravatar/actions/workflows/python-package.yml\n\nA library that provides a Python 3 interface for the Gravatar API.\nAPI details: https://en.gravatar.com/site/implement/\n\nInstallation\n------------\n\nInstall via pip::\n\n    $ pip install libgravatar\n\n\nUsage\n-----\n\nSee more details on https://libgravatar.readthedocs.org/\n\nGravatar API\n~~~~~~~~~~~~\n\nGravatar API requires no authentication to get images and profiles URLs.\n\nGetting the user profile image:\n\n.. code-block:: python\n\n    from libgravatar import Gravatar\n    g = Gravatar('myemailaddress@example.com')\n    g.get_image()\n    'https://www.gravatar.com/avatar/0bc83cb571cd1c50ba6f3e8a78ef1346'\n\nGetting the profile URL:\n\n.. code-block:: python\n\n    from libgravatar import Gravatar\n    g = Gravatar('myemailaddress@example.com')\n    g.get_profile()\n    'https://www.gravatar.com/0bc83cb571cd1c50ba6f3e8a78ef1346'\n\n\nGravatar XML-RPC API\n~~~~~~~~~~~~~~~~~~~~\n\nThe XML-RPC API requires authentication.\n\nYou can use your Gravatar.com's email and password:\n\n.. code-block:: python\n\n    from libgravatar import GravatarXMLRPC\n    g = GravatarXMLRPC('name@example.com', password='1234')\n    g.test() # test the API\n\n\nor if you have an account at Wordpress.com you can use your email and\nAPI key. You can find your API key at https://apikey.wordpress.com/\njust be sure to pass to the function your email instead of your username:\n\n.. code-block:: python\n\n    from libgravatar import GravatarXMLRPC\n    g = GravatarXMLRPC('name@example.com', apikey='1234')\n    g.test() # test the API\n\n\nDevelopment\n-----------\n\nTo contribute to this project or to test this library locally you'll need to install these dependencies:\n\n.. code-block:: shell\n\n    python3 -m venv venv # for example on a virtual environment\n    source venv/bin/activate\n    pip install pytest black\n\nand you can validate your changes running:\n\n.. code-block:: shell\n\n    pytest --doctest-modules --verbose\n    black . --check --diff\n\n\nAuthor and contributors\n-----------------------\n\n* Pablo Seminario (`@pabluk <https://github.com/pabluk>`_)\n* Caleb FANGMEIER (`@cfangmeier <https://github.com/cfangmeier>`_)\n* Rarm NAGALINGAM (`@snowjet <https://github.com/snowjet/>`_)\n* Manan (`@mentix02 <https://github.com/mentix02/>`_)\n* Gareth Simpson (`@xurble <https://github.com/xurble/>`_)\n",
    "bugtrack_url": null,
    "license": "GNU General Public License v3 (GPLv3)",
    "summary": "A library that provides a Python 3 interface for the Gravatar API.",
    "version": "1.0.3",
    "split_keywords": [
        "gravatar"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "d585f169434254f33c22a3a17b27fadd",
                "sha256": "7cd66b7c01ccd133bd6a66f86de1be3b946758f758964c9011d969266b812520"
            },
            "downloads": -1,
            "filename": "libgravatar-1.0.3-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d585f169434254f33c22a3a17b27fadd",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 17464,
            "upload_time": "2022-12-04T20:03:57",
            "upload_time_iso_8601": "2022-12-04T20:03:57.664091Z",
            "url": "https://files.pythonhosted.org/packages/19/3b/b3b58dd4f53304256cc64474ef26c8b87ca5a762c478c49f77303826c40a/libgravatar-1.0.3-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "a3d641c60ad1aa424898ed98d2e7e046",
                "sha256": "3f351f030cec0ecabe367ffd02ea4d88c941cf9ea45083c4d16127241e72219b"
            },
            "downloads": -1,
            "filename": "libgravatar-1.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "a3d641c60ad1aa424898ed98d2e7e046",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 16864,
            "upload_time": "2022-12-04T20:03:59",
            "upload_time_iso_8601": "2022-12-04T20:03:59.458785Z",
            "url": "https://files.pythonhosted.org/packages/d3/23/2331ed38d423e73aef8ceb0e3b70ba09904cf7f1918a7d25a72c3d902fd1/libgravatar-1.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-04 20:03:59",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "pabluk",
    "github_project": "libgravatar",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "libgravatar"
}
        
Elapsed time: 0.01738s