I initially built this site as my first attempt at writing a PHP site. In the last few weeks I've rebuilt it as my first attempt at building a Flask (Python) site. It turns out that I like Flask way more than PHP. Flask reminds me a lot of ASP.NET (in a good way), whereas PHP reminds me a lot of Perl (in a bad way).
Don't get me wrong, I love Perl. But I used Perl to build websites back in the mid-to-late 90s and PHP reminds me of those days. I'm glad web development has advanced a lot since then. There probably are layers on to of PHP that make it a more efficient development platform, but they weren't obvious to me a beginner. With Flask, doing things efficiently was pretty straightforward.
Based on my very limited experience, Flask compares to PHP favorably in many ways:
Porting my DynamoDb-based blog was pretty simple. My DynamoDb table is completely unchanged. Some of the porting was just changing PHP-style lists and dicts to Python-style. At some point I'll share that code.
I found deploying the Flask version of my site to be a bit tricky. I wasn't able to get it running under Apache on my EC2 instances running Amazon Linux 2-- I had to switch to Ubuntu. That effort prompted me to experiment with AWS CodeBuild, CodePipeline, and CodeDeploy. Now, any PR in my GitHub repo kicks off a deployment to my test site. Deploying to my production site is just one approval away.