Skip to main content

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()

Release files for py-avataaars-no-png 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for py-avataaars-no-png 1.0.1
File Size Uploaded
py-avataaars-no-png-1.0.1.tar.gz 123.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for py-avataaars-no-png 1.0.1
File Interpreter ABI Platform
py_avataaars_no_png-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size:316.2 kB

Release files / py-avataaars-no-png-1.0.1.tar.gz

Download URL py-avataaars-no-png-1.0.1.tar.gz
Size 123.6 kB
Tags Source
SHA-256 checksum
How to use checksums
9cd593fe93d6e223626903da7310ad53e857b3fd856ce7e7f2b1faa401740054
BLAKE2b-256 checksum
How to use checksums
3c54f003409246deb1b328510f892383bffc7fa64fa948f0ff81f47583ad2ed1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.10.5 Linux/5.18.8-zen1-1-zen

Release files / py_avataaars_no_png-1.0.1-py3-none-any.whl

Download URL py_avataaars_no_png-1.0.1-py3-none-any.whl
Size 192.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f1623e9784cec75048444d6992b8a7fb26f40d87f33174769f9528499e39955e
BLAKE2b-256 checksum
How to use checksums
d958c54cd2103705761e33a39d42531107693d4b5da1ad1a2d580b5264e77aac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.10.5 Linux/5.18.8-zen1-1-zen

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page