animedex.models.character
Character / staff / studio domain models.
These records come from AniList’s character / staff / studio endpoints and surface as their own subcommands in the the high-level backend layer CLI. The trio shares a structural pattern - id, name, source - and adds a small number of role-specific optional fields.
the high-level backend layer expanded each model based on real-data reconnaissance against
AniList (see issue #5 §2). The added fields (gender / age / dates /
favourites / native names) are populated by AniList; backends that
don’t expose them leave them None.
Character
- class animedex.models.character.Character(*, id: str, name: str, name_native: str | None = None, name_alternatives: List[str] = [], role: str | None = None, image_url: str | None = None, description: str | None = None, gender: str | None = None, age: str | None = None, date_of_birth: PartialDate | None = None, favourites: int | None = None, source: SourceTag)[source]
Bases:
AnimedexModelA fictional character.
- Variables:
id (str) – Canonical
"<source>:char:<id>"identifier.name (str) – Display name (typically romaji / English).
name_native (str or None) – Native-script name (typically Japanese).
name_alternatives (list of str) – Alternative names / nicknames.
role (str or None) – Casting role when reported (e.g.
"MAIN","SUPPORTING").image_url (str or None) – Portrait URL when one is available.
description (str or None) – Free-text description from upstream.
gender (str or None) – Free-form gender string (“Male”, “Female”, “Non-binary”, …). Upstream vocabularies vary.
age (str or None) – Free-form age string. AniList sometimes returns a composite (e.g.
"55 | 13 (after 5-year gap)") so the field is left as a string rather than coerced.date_of_birth (PartialDate or None) – Birthday with any of year/month/day potentially unknown.
favourites (int or None) – Number of users that marked this character as a favourite (AniList-specific signal).
source (SourceTag) – Provenance tag.
- date_of_birth: PartialDate | None
Staff
- class animedex.models.character.Staff(*, id: str, name: str, name_native: str | None = None, occupations: List[str] = [], gender: str | None = None, age: int | None = None, date_of_birth: PartialDate | None = None, years_active: List[int] = [], home_town: str | None = None, language: str | None = None, image_url: str | None = None, description: str | None = None, favourites: int | None = None, source: SourceTag)[source]
Bases:
AnimedexModelA production staff member.
- Variables:
id (str) – Canonical
"<source>:staff:<id>"identifier.name (str) – Display name.
name_native (str or None) – Native-script name.
occupations (list of str) – Production roles, in upstream order. Empty list when the upstream does not report.
gender (str or None) – Free-form gender string.
age (int or None) – Numeric age when reported. Upstream returns this as int.
date_of_birth (PartialDate or None) – Birthday with partial precision.
years_active (list of int) – Years (or year ranges) the staff was professionally active. Upstream returns 0-2 ints (start / end).
home_town (str or None) – Birthplace city / region.
language (str or None) – Primary working language (e.g.
"Japanese","English").image_url (str or None) – Portrait URL.
description (str or None) – Free-text bio.
favourites (int or None) – Count of users marking the staff as favourite.
source (SourceTag) – Provenance tag.
- date_of_birth: PartialDate | None