SVG-Avatar generator library
Project description
py-avataaars - Python component for Avataaars
FORK OF https://github.com/kebu/py-avataaars
Changes
- Switched from setup.py to Poetry
- Removed svg2png-dependency -> No PNG-support
Original README
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_svg = avatar.render_svg()
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_svg = avatar.render_svg()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file py-avataaars-no-png-1.0.1.tar.gz.
File metadata
- Download URL: py-avataaars-no-png-1.0.1.tar.gz
- Upload date:
- Size: 123.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.10.5 Linux/5.18.8-zen1-1-zen
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9cd593fe93d6e223626903da7310ad53e857b3fd856ce7e7f2b1faa401740054
|
|
| MD5 |
27b6d85d78f40aba814f95b630691dfc
|
|
| BLAKE2b-256 |
3c54f003409246deb1b328510f892383bffc7fa64fa948f0ff81f47583ad2ed1
|
File details
Details for the file py_avataaars_no_png-1.0.1-py3-none-any.whl.
File metadata
- Download URL: py_avataaars_no_png-1.0.1-py3-none-any.whl
- Upload date:
- Size: 192.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.10.5 Linux/5.18.8-zen1-1-zen
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1623e9784cec75048444d6992b8a7fb26f40d87f33174769f9528499e39955e
|
|
| MD5 |
199c7aa6c090c9132810190f2b77d32a
|
|
| BLAKE2b-256 |
d958c54cd2103705761e33a39d42531107693d4b5da1ad1a2d580b5264e77aac
|