Skip to content

Interactive Python web app that generates random user profiles with gender-consistent names and avatars, updated asynchronously using HTMX + FastAPI.

Notifications You must be signed in to change notification settings

smart-developer1791/python-profile-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Profile Generator

Python FastAPI HTMX Render

Interactive random user profile generator with instant results

Generate random user profiles asynchronously without page reload.


Endpoints

Path Method Description
/ GET Main page with an initial random profile display
/profile GET Endpoint to fetch a new random profile (HTML snippet for HTMX)

Profile Generation & Avatars

Profiles are generated using Faker with consistent gender names.
Avatars are chosen randomly from RandomUser.me:

  • Avatar URLs follow the format: https://randomuser.me/api/portraits/{avatar_gender}/{avatar_id}.jpg
    where {avatar_gender} is "men" or "women" and {avatar_id} is 0-99.
  • Emails are currently random, even though names respect gender.
  • The backend function generate_profile() handles all profile generation.
  • You can adjust or replace the avatar source by modifying the URL generation logic.

Features

  • Generate a random user profile instantly
  • Works asynchronously without full page reload (HTMX + FastAPI)
  • Responsive design for desktop and mobile
  • Profiles include name, email, phone, address, job, and avatar

Technology Stack

  • Python 3.12 – core programming language
  • FastAPI – high-performance backend framework
  • Jinja2 – HTML templating
  • HTMX – asynchronous frontend requests
  • Tailwind CSS – responsive and modern UI
  • Render.com – zero-config deployment

About

Interactive Python web app that generates random user profiles with gender-consistent names and avatars, updated asynchronously using HTMX + FastAPI.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published