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.FacialHairColor.BLACK,
top_type=pa.TopType.SHORT_HAIR_SHORT_FLAT,
hat_color=pa.ClotheColor.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.ClotheColor.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.0.2.tar.gz
(4.5 kB
view hashes)
Built Distribution
py_avataaars-1.0.2-py3-none-any.whl
(191.1 kB
view hashes)
Close
Hashes for py_avataaars-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35e530387709090e8d436b8e8cabe3ae77e45dbb759c1dd58fd1bb95cd601b9a |
|
MD5 | 33c97e57014c5d5464f17cf1517a0419 |
|
BLAKE2b-256 | ec9e70c4ccee3889f360b48360155131cb28543e69a61dda3764c0c689834894 |