Unique avatars from dozens of styles — deterministic, customizable, vector-based.
Project description
DiceBear Core (Python)
Python implementation of the DiceBear avatar library. Generates deterministic SVG avatars from style definitions and a seed string.
DiceBear is available for multiple languages. All implementations share the same PRNG and rendering pipeline, producing identical SVG output for the same seed, style, and options — regardless of the language used.
Installation
pip install dicebear-core
Requires Python 3.10 or newer.
Usage
import json
from importlib.resources import files
from dicebear import Avatar
# From a style definition (here from the dicebear-styles package)
definition = json.loads(
files("dicebear_styles").joinpath("lorelei.json").read_text("utf-8")
)
avatar = Avatar(definition, {"seed": "John Doe", "size": 128})
avatar.to_string() # SVG string
avatar.to_data_uri() # data:image/svg+xml;charset=utf-8,...
Using the Style class
from dicebear import Avatar, Style
style = Style(definition)
# Create multiple avatars from the same style
avatar1 = Avatar(style, {"seed": "Alice"})
avatar2 = Avatar(style, {"seed": "Bob"})
Sponsors
Advertisement: Many thanks to our sponsors who provide us with free or discounted products.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dicebear_core-10.2.0.tar.gz.
File metadata
- Download URL: dicebear_core-10.2.0.tar.gz
- Upload date:
- Size: 43.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
577e02da8b604c058cd8cf30e7e3b94db11097c3724b840fb830d280840fdd68
|
|
| MD5 |
038f78744e3de602fd08a658bc3ee1d9
|
|
| BLAKE2b-256 |
1ef2b9bb3f80e2e27e5937b50358acd84bd7c5e75cc9671fe2a9d06c0313d4c6
|
Provenance
The following attestation bundles were made for dicebear_core-10.2.0.tar.gz:
Publisher:
publish.yml on dicebear/dicebear
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dicebear_core-10.2.0.tar.gz -
Subject digest:
577e02da8b604c058cd8cf30e7e3b94db11097c3724b840fb830d280840fdd68 - Sigstore transparency entry: 1783085418
- Sigstore integration time:
-
Permalink:
dicebear/dicebear@f1286d8fd9baf3f64145296a2b3a5956684c2f6b -
Branch / Tag:
refs/tags/v10.2.0 - Owner: https://github.com/dicebear
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f1286d8fd9baf3f64145296a2b3a5956684c2f6b -
Trigger Event:
push
-
Statement type:
File details
Details for the file dicebear_core-10.2.0-py3-none-any.whl.
File metadata
- Download URL: dicebear_core-10.2.0-py3-none-any.whl
- Upload date:
- Size: 38.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9689ce6462bd389b3200cf12b11d56b031c40d3378e4b510352e105a45fca522
|
|
| MD5 |
dc16bff1d5774b3af7030475c38b6cc2
|
|
| BLAKE2b-256 |
ccce7edf06e089e885cee87950539eac3b011ab68f362556479133d26194254c
|
Provenance
The following attestation bundles were made for dicebear_core-10.2.0-py3-none-any.whl:
Publisher:
publish.yml on dicebear/dicebear
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dicebear_core-10.2.0-py3-none-any.whl -
Subject digest:
9689ce6462bd389b3200cf12b11d56b031c40d3378e4b510352e105a45fca522 - Sigstore transparency entry: 1783085703
- Sigstore integration time:
-
Permalink:
dicebear/dicebear@f1286d8fd9baf3f64145296a2b3a5956684c2f6b -
Branch / Tag:
refs/tags/v10.2.0 - Owner: https://github.com/dicebear
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f1286d8fd9baf3f64145296a2b3a5956684c2f6b -
Trigger Event:
push
-
Statement type: