🛠ī¸Utility Functions

You can find some functions here that can help with quickly creating avatars or getting useful information.

def create_avatar()

Create a DAvatar object and return it.

def create_avatar(
    style: DStyle,
    seed: str,
    options: DOptions | None = None,
    customisations: dict | None = None
) -> DAvatar

Returns: a new DAvatar object

Parameter
Type
Default
Description

style

DStyle.random()

seed

None

Base string to determine the avatar.

options

DOptions.empty

General options for the avatar.

customisations

None

Customisations (for the chosen style)

def create_random()

Create a random DAvatar object and return it.

def create_random(
    randomOptions: bool = False
) -> DAvatar

Returns: a new DAvatar object

Parameter
Type
Default
Description

randomOptions

False

Whether to use random (background) options for this avatar or not

def bulk_create()

Create a list of DAvatar objects (with random seeds).

def bulk_create(
    style: DStyle = DStyle.random(),
    amount: int = 2,
    *,
    options: DOptions = DOptions.default,
    custom: dict = None
) -> list[DAvatar]

Returns: list[DAvatar]: a list of DAvatar objects

Parameter
Type
Default
Description

style

DStyle.random()

amount

2

The amount of DAvatar objects you want to create.

options

DOptions.empty

General options for the avatars.

custom

None

Customisations (for the chosen style)

Last updated