Name | libravatar-py JSON |
Version |
1.0.1
JSON |
| download |
home_page | |
Summary | Friendly fork of pyLibravatar for async support. |
upload_time | 2023-10-28 02:39:22 |
maintainer | |
docs_url | None |
author | baseplate-admin |
requires_python | >=3.8,<4.0 |
license | MIT |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# A libravatar client for Python thats built on modern Technology
[![Pepy.tech Badge](https://static.pepy.tech/personalized-badge/libravatar-py?period=week&units=international_system&left_color=grey&right_color=orange&left_text=Downloads)](https://pepy.tech/project/libravatar-py)
[![PyPi Version Badge](https://badge.fury.io/py/libravatar-py.svg)](https://badge.fury.io/py/libravatar-py)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/libravatar-py)](https://github.com/baseplate-admin/libravatar-py/blob/main/setup.py)
[![PyPI - License](https://img.shields.io/pypi/l/libravatar-py)](https://github.com/baseplate-admin/libravatar-py/blob/main/LICENSE)
![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)
[![Lines of Code](https://tokei.rs/b1/github/baseplate-admin/libravatar-py)](https://github.com/baseplate-admin/libravatar-py)
## Introduction :
Friendly fork of [pyLibravatar](https://launchpad.net/pylibravatar).
### Why did I write this library:
While working on the Libravatar client project I came across the well built [pyLibravatar](https://pypi.org/project/pyLibravatar) library. The last update was at Jun 28, 2015 ( Thats over 6 years ago when I was writing this ). So thats why I decided to write this library. It mimics the API ( and functionality ) of [pyLibravatar](https://pypi.org/project/pyLibravatar) but with `asyncio` spice.
### Why use \"libravatar-py\" ?
- Provides API for different kinds of usage.
- Built with modern techknology.
- No unnecessary codes. ( My goal was to keep the library as small as
possible )
- Is very minimal. ( Only provides 4 functions )
- Fully Fedarated and feature rich.
### Why shouldn\'t you use \"libravatar-py\" ?
- I donno ? If you do please submit a Pull Request
# User guide :
## Installation :
Install with pip from pypi (No extra dependencies):
```bash
$ python -m pip install libravatar-py
```
Install with pip from github ( Development | Not Recommended for Production ):
```bash
$ python -m pip install https://codeload.github.com/baseplate-admin/libravatar-py/zip/refs/heads/main
```
## Usage:
Call any of these 4 methods.
`libravatar_url` function ( This will essentially return the base url of
the image ) :
```python
from libravatar import libravatar_url
url = libravatar_url(email="someone@example.com")
print(url)
# https://seccdn.libravatar.org/avatar/16d113840f999444259f73bac9ab8b10
```
`libravatar_img_tag` function ( This will wrap the libravatar url in a \<img /\> tag. You can also customize \_alt text ) :
```python
from libravatar import libravatar_img_tag
url = libravatar_img_tag(email="someone@example.com")
print(url)
# <img src=https://seccdn.libravatar.org/avatar/16d113840f999444259f73bac9ab8b10 alt='Avatar for someone@example.com' />
```
`libravatar_raw_image` function ( This will return the Libravatar image in a binary form ) :
``` python
from libravatar import libravatar_raw_image
res = libravatar_raw_image(email="someone@example.com")
print(res)
# Large binary string.
# To load it.
from PIL import Image
from io import BytesIO
res = Image.open(BytesIO(res))
```
`libravatar_raw_query` function ( Essentially passes the {args, kwargs} to httpx_get_avatar ):
``` python
from libravatar import libravatar_raw_image
# Note this this must be called from an async function
res = await libravatar_raw_query(email="someone@example.com", {})
# All httpx variables available in res
```
# Contributing :
If you like this project add a star. If you have problems or suggestions please put them in the [Issue Tracker](https://github.com/baseplate-admin/libravatar-py/issues). If
you like to add features. Fork this repo and submit a Pull Request. 😛
# Updates :
The library is feature complete ( in my opinion ).
Raw data
{
"_id": null,
"home_page": "",
"name": "libravatar-py",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8,<4.0",
"maintainer_email": "",
"keywords": "",
"author": "baseplate-admin",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/64/8b/857d4ac9a91242b695190959735f85c19709905bf386dc7f22df8da3ddc3/libravatar_py-1.0.1.tar.gz",
"platform": null,
"description": "# A libravatar client for Python thats built on modern Technology\n\n[![Pepy.tech Badge](https://static.pepy.tech/personalized-badge/libravatar-py?period=week&units=international_system&left_color=grey&right_color=orange&left_text=Downloads)](https://pepy.tech/project/libravatar-py)\n[![PyPi Version Badge](https://badge.fury.io/py/libravatar-py.svg)](https://badge.fury.io/py/libravatar-py)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/libravatar-py)](https://github.com/baseplate-admin/libravatar-py/blob/main/setup.py)\n[![PyPI - License](https://img.shields.io/pypi/l/libravatar-py)](https://github.com/baseplate-admin/libravatar-py/blob/main/LICENSE)\n![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)\n[![Lines of Code](https://tokei.rs/b1/github/baseplate-admin/libravatar-py)](https://github.com/baseplate-admin/libravatar-py)\n\n## Introduction :\n\nFriendly fork of [pyLibravatar](https://launchpad.net/pylibravatar).\n\n### Why did I write this library:\n\nWhile working on the Libravatar client project I came across the well built [pyLibravatar](https://pypi.org/project/pyLibravatar) library. The last update was at Jun 28, 2015 ( Thats over 6 years ago when I was writing this ). So thats why I decided to write this library. It mimics the API ( and functionality ) of [pyLibravatar](https://pypi.org/project/pyLibravatar) but with `asyncio` spice.\n\n### Why use \\\"libravatar-py\\\" ?\n\n- Provides API for different kinds of usage.\n- Built with modern techknology.\n- No unnecessary codes. ( My goal was to keep the library as small as\n possible )\n- Is very minimal. ( Only provides 4 functions )\n- Fully Fedarated and feature rich.\n\n### Why shouldn\\'t you use \\\"libravatar-py\\\" ?\n\n- I donno ? If you do please submit a Pull Request\n\n# User guide :\n\n## Installation :\n\nInstall with pip from pypi (No extra dependencies):\n\n```bash\n$ python -m pip install libravatar-py\n```\n\nInstall with pip from github ( Development | Not Recommended for Production ):\n```bash\n$ python -m pip install https://codeload.github.com/baseplate-admin/libravatar-py/zip/refs/heads/main\n```\n## Usage:\n\nCall any of these 4 methods.\n\n`libravatar_url` function ( This will essentially return the base url of\nthe image ) :\n\n```python\nfrom libravatar import libravatar_url\n\nurl = libravatar_url(email=\"someone@example.com\")\nprint(url)\n# https://seccdn.libravatar.org/avatar/16d113840f999444259f73bac9ab8b10\n```\n\n`libravatar_img_tag` function ( This will wrap the libravatar url in a \\<img /\\> tag. You can also customize \\_alt text ) :\n\n```python\nfrom libravatar import libravatar_img_tag\n\nurl = libravatar_img_tag(email=\"someone@example.com\")\nprint(url)\n# <img src=https://seccdn.libravatar.org/avatar/16d113840f999444259f73bac9ab8b10 alt='Avatar for someone@example.com' />\n```\n\n`libravatar_raw_image` function ( This will return the Libravatar image in a binary form ) :\n\n``` python\nfrom libravatar import libravatar_raw_image\n\nres = libravatar_raw_image(email=\"someone@example.com\")\nprint(res)\n# Large binary string.\n# To load it.\nfrom PIL import Image\nfrom io import BytesIO\n\nres = Image.open(BytesIO(res))\n```\n\n`libravatar_raw_query` function ( Essentially passes the {args, kwargs} to httpx_get_avatar ):\n\n``` python\nfrom libravatar import libravatar_raw_image\n# Note this this must be called from an async function\nres = await libravatar_raw_query(email=\"someone@example.com\", {})\n# All httpx variables available in res\n```\n\n# Contributing :\n\nIf you like this project add a star. If you have problems or suggestions please put them in the [Issue Tracker](https://github.com/baseplate-admin/libravatar-py/issues). If\nyou like to add features. Fork this repo and submit a Pull Request. \ud83d\ude1b\n\n# Updates :\n\nThe library is feature complete ( in my opinion ).\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Friendly fork of pyLibravatar for async support.",
"version": "1.0.1",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "8fce48e35c13e89cfb23323cc2b6aa44ff62c29e6a3a7a1a5a610263a108a35f",
"md5": "873d214acc0295a6f0cb677a0c32a0da",
"sha256": "b2339bbeac680abd356b647288615ae47d6907c3f66d0075218a3a802806ef23"
},
"downloads": -1,
"filename": "libravatar_py-1.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "873d214acc0295a6f0cb677a0c32a0da",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8,<4.0",
"size": 6571,
"upload_time": "2023-10-28T02:39:21",
"upload_time_iso_8601": "2023-10-28T02:39:21.062416Z",
"url": "https://files.pythonhosted.org/packages/8f/ce/48e35c13e89cfb23323cc2b6aa44ff62c29e6a3a7a1a5a610263a108a35f/libravatar_py-1.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "648b857d4ac9a91242b695190959735f85c19709905bf386dc7f22df8da3ddc3",
"md5": "fa56285bdcf4035fca3161a8857ec321",
"sha256": "a7ecb9f2cb2cab4487bed2c0a0974a9da2e2db85e37fa1d5d6d844ea7f86bb1f"
},
"downloads": -1,
"filename": "libravatar_py-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "fa56285bdcf4035fca3161a8857ec321",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8,<4.0",
"size": 4947,
"upload_time": "2023-10-28T02:39:22",
"upload_time_iso_8601": "2023-10-28T02:39:22.583913Z",
"url": "https://files.pythonhosted.org/packages/64/8b/857d4ac9a91242b695190959735f85c19709905bf386dc7f22df8da3ddc3/libravatar_py-1.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-28 02:39:22",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "libravatar-py"
}