Created
November 28, 2021 19:28
-
-
Save deusmachinea/6f2012efb5d4fb981d75ce829931b8f4 to your computer and use it in GitHub Desktop.
Revisions
-
deusmachinea created this gist
Nov 28, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ from py_avataaars import PyAvataaar def generate_mock_user_details(path, name): avatar = pa.PyAvataaar( style=pa.AvatarStyle.TRANSPARENT, skin_color=pa.SkinColor[random.choice([i.name for i in pa.SkinColor])], hair_color=pa.HairColor[random.choice([i.name for i in pa.HairColor])], facial_hair_type=pa.FacialHairType[random.choice([i.name for i in pa.FacialHairType])], facial_hair_color=pa.HairColor[random.choice([i.name for i in pa.HairColor])], top_type=pa.TopType[random.choice([i.name for i in pa.TopType])], hat_color=pa.Color[random.choice([i.name for i in pa.Color])], mouth_type=pa.MouthType[random.choice([i.name for i in pa.MouthType])], eye_type=pa.EyesType[random.choice([i.name for i in pa.EyesType])], eyebrow_type=pa.EyebrowType[random.choice([i.name for i in pa.EyebrowType])], nose_type=pa.NoseType[random.choice([i.name for i in pa.NoseType])], accessories_type=pa.AccessoriesType[random.choice([i.name for i in pa.AccessoriesType])], clothe_type=pa.ClotheType[random.choice([i.name for i in pa.ClotheType])], clothe_color=pa.Color[random.choice([i.name for i in pa.Color])], clothe_graphic_type=pa.ClotheGraphicType[random.choice([i.name for i in pa.ClotheGraphicType])], ) avatar.render_png_file(f'{path}/{name}.png')