UI Avatars for Python

UI Avatars for Python

2026 – PresentSee live
Steve on X

Every app needs avatars, and most end up hand-building a chain of fallback URLs: the person's photo if they have one, colored initials if they don't. UI Avatars for Python does it in one call. It uses a Gravatar or Libravatar photo where there is one, and falls back to initials from ui-avatars.com, in a color that's always the same for the same person.

It's on PyPI, and gives everyone on Coworkations and The Valley Signal their avatar.

UI Avatars for Python

What it does

  • Colors chosen from a hash of the person, from Tailwind's palette, with a tinted background that suits light and dark designs

  • Its own initials, rather than the service's

  • Libravatar, self-hosted and regional sources

  • Masks, rounding and more formats, through an image proxy

  • A Django mixin that finds a model's name and image fields by itself

  • 100% test coverage, and releases published to PyPI from GitHub

Along the way I sent ui-avatars itself alpha channel support, tests and CI.