Skip to content

smart-developer1791/python-advice-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Advice Generator

Python FastAPI HTMX Tailwind Jinja2 httpx API Render

Interactive random advice generator with instant results

Fetches fresh advice asynchronously via an external API — no page reload needed.


Endpoints

Path Method Description
/ GET Main page with initial advice
/advice GET Returns a new advice card (HTMX partial)
/api/advice GET Returns raw advice JSON (your own internal API endpoint)

Advice Source

The app fetches advice from the public API:

https://api.adviceslip.com/advice

Handled inside fetch_advice() using httpx.AsyncClient.
You can replace this URL with any other advice source if desired.


Features

  • Get fresh advice instantly (HTMX partial updates)
  • Fully async API fetching (httpx + FastAPI)
  • Beautiful responsive UI (Tailwind)
  • Separate JSON API: /api/advice

Technology Stack

  • Python 3.12
  • FastAPI
  • httpx (async API client)
  • Jinja2
  • HTMX
  • Tailwind CSS
  • Render.com

About

Interactive random advice generator web app with instant updates using FastAPI, HTMX, and Tailwind CSS.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published