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
py-avataaars-no-png-1.0.0.tar.gz
(123.6 kB
view details)
Built Distribution
File details
Details for the file py-avataaars-no-png-1.0.0.tar.gz
.
File metadata
- Download URL: py-avataaars-no-png-1.0.0.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 | cdcec6af9200af1ebaed502b28a0c01a6221811ce026c41f7df9b4f45c33c469 |
|
MD5 | 44c828dd38c3e405da2d32043005a760 |
|
BLAKE2b-256 | cd1aaa5ec944de993e282a368bbf10b93c72149fa77d9cc14a3a4c77eb1a0de0 |
File details
Details for the file py_avataaars_no_png-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: py_avataaars_no_png-1.0.0-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 | 18fdd47e2f00ed81aaed666a1c2bde418df893936ad383207a3bc61ee2d0924f |
|
MD5 | 39eccdb263248168852090c705899744 |
|
BLAKE2b-256 | 369ed8f03b60c6284eb02f1611236cb4dc2d1113aee9649604d0123831800e27 |