Name | tiny-userpic JSON |
Version |
0.3.3
JSON |
| download |
home_page | None |
Summary | Oversimplified Github-like userpic (avatar) generator |
upload_time | 2024-12-14 16:35:06 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.10 |
license | MIT |
keywords |
avatar
avatar-generator
userpic
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Github-like userpic (avatar) generator
Oversimplified Github-like userpic (avatar) generator
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![PyPI](https://img.shields.io/pypi/v/tiny-userpic.svg)](https://pypi.python.org/pypi/tiny-userpic)
[![PyPI](https://img.shields.io/pypi/dm/tiny-userpic.svg)](https://pypi.python.org/pypi/tiny-userpic)
## Install from PyPI
Library can be installed using pip:
```bash
pip install tiny-userpic
```
## Generate PIL image
```python
from PIL.Image import Image
from userpic import make_userpic_image
# make PIL Image object
image: Image = make_userpic_image(
size=(7, 5),
padding=(20, 10),
mode='RGB',
image_size=(300, 300),
background='white',
foreground='black',
)
# save as JPEG file
with open('output.jpeg', 'wb') as fp:
image.save(fp)
```
## Generate SVG data
```python
from userpic import make_userpic_svg
# make string data
image: str = make_userpic_svg(
size=(7, 5),
padding=(20, 10),
image_size=(300, 300),
background='white',
foreground='black',
)
# save as SVG file
with open('output.svg', 'w') as fp:
fp.write(image)
```
## The result should look something like this
![Awesome genearted userpic!](example.png)
Raw data
{
"_id": null,
"home_page": null,
"name": "tiny-userpic",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "avatar, avatar-generator, userpic",
"author": null,
"author_email": "Aleksandr Shpak <shpaker@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/62/03/d6a6657685ec3904a714f9ce6084a4b19039ee6a3e5707bcc8617115681c/tiny_userpic-0.3.3.tar.gz",
"platform": null,
"description": "# Github-like userpic (avatar) generator\n\nOversimplified Github-like userpic (avatar) generator\n\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n[![PyPI](https://img.shields.io/pypi/v/tiny-userpic.svg)](https://pypi.python.org/pypi/tiny-userpic)\n[![PyPI](https://img.shields.io/pypi/dm/tiny-userpic.svg)](https://pypi.python.org/pypi/tiny-userpic)\n\n## Install from PyPI\n\nLibrary can be installed using pip:\n\n```bash\npip install tiny-userpic\n```\n\n## Generate PIL image\n\n```python\nfrom PIL.Image import Image\n\nfrom userpic import make_userpic_image\n\n# make PIL Image object\nimage: Image = make_userpic_image(\n size=(7, 5),\n padding=(20, 10),\n mode='RGB',\n image_size=(300, 300),\n background='white',\n foreground='black',\n)\n\n# save as JPEG file\nwith open('output.jpeg', 'wb') as fp:\n image.save(fp)\n```\n\n## Generate SVG data\n\n```python\n\nfrom userpic import make_userpic_svg\n\n# make string data\nimage: str = make_userpic_svg(\n size=(7, 5),\n padding=(20, 10),\n image_size=(300, 300),\n background='white',\n foreground='black',\n)\n\n# save as SVG file\nwith open('output.svg', 'w') as fp:\n fp.write(image)\n```\n\n## The result should look something like this\n\n![Awesome genearted userpic!](example.png)\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Oversimplified Github-like userpic (avatar) generator",
"version": "0.3.3",
"project_urls": {
"Homepage": "https://github.com/shpaker/tiny-userpic/",
"Repository": "https://github.com/shpaker/tiny-userpic/"
},
"split_keywords": [
"avatar",
" avatar-generator",
" userpic"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "4f58467dbcb9a89a0f4459064f77e2c52c685675201d8959fe456f09c2311d92",
"md5": "73fcc61bf48606e976e9f67b3c723de7",
"sha256": "362878f310671e9cc3318e86af2546937461390153b11fef15177c02d16477db"
},
"downloads": -1,
"filename": "tiny_userpic-0.3.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "73fcc61bf48606e976e9f67b3c723de7",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 3771,
"upload_time": "2024-12-14T16:35:04",
"upload_time_iso_8601": "2024-12-14T16:35:04.242803Z",
"url": "https://files.pythonhosted.org/packages/4f/58/467dbcb9a89a0f4459064f77e2c52c685675201d8959fe456f09c2311d92/tiny_userpic-0.3.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "6203d6a6657685ec3904a714f9ce6084a4b19039ee6a3e5707bcc8617115681c",
"md5": "a5021871362793a2062de321eedb3c57",
"sha256": "4ceb55477ac88bd69fe011b65302c132cb1365ed861ae6a4e627cfd21b3c13e5"
},
"downloads": -1,
"filename": "tiny_userpic-0.3.3.tar.gz",
"has_sig": false,
"md5_digest": "a5021871362793a2062de321eedb3c57",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 4823,
"upload_time": "2024-12-14T16:35:06",
"upload_time_iso_8601": "2024-12-14T16:35:06.525529Z",
"url": "https://files.pythonhosted.org/packages/62/03/d6a6657685ec3904a714f9ce6084a4b19039ee6a3e5707bcc8617115681c/tiny_userpic-0.3.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-14 16:35:06",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "shpaker",
"github_project": "tiny-userpic",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "tiny-userpic"
}