A python API wrapper for DiceBear's avatar generating API.
Project description
DiceBear Py Wrapper
dicebear
is an API wrapper for https://dicebear.com. Using the API you can get custom avatars for your program.
How to install
Run pip install dicebear
If that doesn't work try py -m pip install dicebear
Usage
from dicebear import Avatar
options = {
"flip": True,
"rotate": 90
}
av = Avatar(type="avataaars", seed="John Apple", options=options) # this returns a URL to the avatar
print(av)
av.edit(options={"flip": True}) # this will edit the avatar instance
print(av)
Options
All the possible options for the avatar.
seed
(type: string) - the seed for the avatar generatordataUri
(type: boolean) - wether or not to give the dataUriflip
(type: boolean) - flips the image verticallyrotate
(type: int) - rotates the avatarscale
(type: int) - edits the scale of the avatarradius
(type: int) - edits the radius of the avatarsize
(type: int) - the size of the avatarbackgroundColor
(type: hex 0x) - the background color of the avatartranslateX
(type: int) - move the avatar horizontallytranslateY
(type: int) - move the avatar vertically
Styles
All the possible avatar styles.
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
dicebear-0.1.2.tar.gz
(3.5 kB
view hashes)