Python Avatar generator library
Project description
py-avataaars - Python component for Avataaars
Python port of https://github.com/fangpenlin/avataaars
The core React component for Avataaars Generator developed by Fang-Pen Lin, based on the Sketch library Avataaars designed by Pablo Stanley.
Features
- SVG based
- Light weight
- Easy to use
Install
pip install py-avataaars
Usage
Basic usage:
from py_avataaars import PyAvataaar
avatar = PyAvataaar()
avatar.render_png_file('<output_file.png>')
Specify each part of avatar:
import py_avataaars as pa
avatar = pa.PyAvataaar(
style=pa.AvatarStyle.CIRCLE,
skin_color=pa.SkinColor.LIGHT,
hair_color=pa.HairColor.BROWN,
facial_hair_type=pa.FacialHairType.DEFAULT,
facial_hair_color=pa.HairColor.BLACK,
top_type=pa.TopType.SHORT_HAIR_SHORT_FLAT,
hat_color=pa.Color.BLACK,
mouth_type=pa.MouthType.SMILE,
eye_type=pa.EyesType.DEFAULT,
eyebrow_type=pa.EyebrowType.DEFAULT,
nose_type=pa.NoseType.DEFAULT,
accessories_type=pa.AccessoriesType.DEFAULT,
clothe_type=pa.ClotheType.GRAPHIC_SHIRT,
clothe_color=pa.Color.HEATHER,
clothe_graphic_type=pa.ClotheGraphicType.BAT,
)
avatar.render_png_file('<output_file.png>')
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
py-avataaars-1.1.2.tar.gz
(5.6 kB
view details)
Built Distribution
py_avataaars-1.1.2-py3-none-any.whl
(191.3 kB
view details)
File details
Details for the file py-avataaars-1.1.2.tar.gz
.
File metadata
- Download URL: py-avataaars-1.1.2.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f50e838f98bad406b16ae8754d4ae5f755123113f67760775f774a58a21ae77 |
|
MD5 | b615b0367ef479e2ec57f30ecff28fc7 |
|
BLAKE2b-256 | b9146f48bcedefed87cd6fa97e70d767cf51cd9fded3d8ec642bcd7446342eb1 |
File details
Details for the file py_avataaars-1.1.2-py3-none-any.whl
.
File metadata
- Download URL: py_avataaars-1.1.2-py3-none-any.whl
- Upload date:
- Size: 191.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0ac3892264e7fb1a8572a29617e0d9eadf6928f70faaadc5adcfac8e0877106 |
|
MD5 | 2fa05fdbd2a89b950c3db3dc72b86a48 |
|
BLAKE2b-256 | a676d8a4dc83efbf393a818abe7d00a7fb64bc375f101b60ff903b05d7d2990d |