Python · Flask · Google Cloud Run · AI-built pages

I Ching and weather on Flask

A Flask web server on Google Cloud Run with an I Ching hexagram generator built two ways, by GitHub Copilot and by Claude, plus JSON status and weather endpoints.

I Ching hexagram generator

The traditional three-coin method: throw three coins six times to build a six-line hexagram from the bottom up, then read which of the 64 classic hexagrams it is. Two versions to compare:

Show the prompt used to build the Claude version

Built by Claude Code (Opus 5.5) from this prompt, reusing the existing Python I Ching functions and 64-hexagram data:

see in this folder : C:\DEV\Repositories\GitHub\phython-server-rhys
I have a basic python flask app i have it hosted on google cloud run serverless.
All is in main.py. its has a basic couple of pages (endpoints) plus it embeds a python iching page  and functions.

1. remove the existing iching to its own page to seaprate code form te simple endpoints

2. the iching i know you can do better
(I want it to show the 6 empty lines, and a button, as you clickc the button six times it show the coins thrown next to each line (3 coins heads or tails)  and when all are thrown its show the iching patter with red lines indicating chnge, its showe the chaning iching to and reads the text for the correct symbol.
Reuse the existing functions (def: whatever) and iching 64 description data, etc

then link to coth ichings for mthe home page, old one cvalled copilot, new one called Claude

embed this prompt message into a collapsed div under the new claudes homepage link stating what it is

Follow-up prompt:

that is good, show each line  as soon as we generate it, do not wait untl the end

Try the weather endpoint

Calls this server's /weather?lat=53.41&lon=-2.15, which asks Open-Meteo for the current weather and adds a plain-English description.

Pick a place or enter coordinates, then press Get weather.

Endpoints

How it's built and run