This is a great resource, and there are some neat inclusions like Falcon, but I find the main trouble when building python web apps is deployment. I always feel like I've duct-taped my carefully written app to the web-server.
Why, a Docker container. Yes, even on Windows. Pack up everything into a single image, downloadable from nearly anywhere.
Your web server (which likely also terminates TLS) has to have fastcgi support, you configure the fastcgi and database ports, maybe mount a directory with config files into the container, and that's it.
Sometimes all you have is a Windows box. You can either run Linux in a VM on it, or use WSL, or run native Windows containers which are a thing. Imagine that you have a binary dependency which is Windows-specific.
And WSL2 takes it a stage further, running linux-native docker on a linux kernel (albeit wsl2 is itself running in a specialised Hyper-V machine).
I haven't used Docker with WSL2 yet, but in other uses I've found WSL2 extremely fast. As long as you stay within its vhd, file access is ext4-quick. And on my machine running the geekbench cli gave me almost identical results to a native linux install.
You can very easily deploy WSGI-compatible apps to AWS Lambda in seconds with the open-source library Zappa (https://github.com/Miserlou/Zappa). Zero server maintenance and zero cost if nobody is using your apps (I put up personal apps all the time with this paradigm, it's great). I love it so much I wrote a book about it: https://compellingpython.com/
Where have you deployed? I'm looking to switch for my Django website. I'd like something full-serve like Heroku, but Heroku doesn't work well with sqlite.
If you don't mind a little sysadmin work I've had good experiences with Dokku[1]. I spin up a Digital Ocean droplet or AWS Lightsail instance and it's my own mini Heroku.
It's great for side projects without the limitations of Heroku's free tier. Lots of plugins (Postgres S3 backups, Lets Encrypt certificates) are icing on the cake.
I work on a selection of internal applications and services and we run everything with Dokku. I was skeptical at first because it made initial [legacy code] deployments a bit of a pain, but I’ve been converted. Not sure I’d run everything that way but for small-scale applications it’s a breeze. And because you have to do the sysadmin work yourself it’s a bit more flexible than Heroku.
I just looked at this myself yesterday and Heroku offers free postgresql instance for under 10K rows. And decided to skip S3-like solutions by embedding my compressed image to the DB[0]. Want 10k-10M rows? That's $9 a month. A bit steep, but easier than configuring DO instances.
[0]: I know this is not best practice, but this is a small project and this is a hack that I fully know the tradeoffs for.
Depending on what you need and your traffic, a simple $5 Digital Ocean droplet with a nginx reverse proxy in front of Django would do the trick. It'd still let you run sqlite, but Django's pretty powerful when you give it postgres (which you could also run in the droplet).
yes, DB is local on app server. Sqlite is good for my uses. My DB is about 20 MBs. I like to download the sqlite file to my PC to do analysis as the data changes. Postgres seems like overkill and more complicated
AWS Elastic Beanstalk supports Python, and I’ve had a Flask app hosted there for several years now. Two or three easily-fixed gotchas aside, it works great.
I have had the opposite experience personally. Any non-trivial application I've deployed has been a lot more complicated with PHP than anything I ever experienced with Python.
Asyncio really makes a difference here. I also hate that PHP has to spin up with every single request. This is something I have never gotten used to (From my understanding, most Python web frameworks just give you a clear/fresh Request Object, which is so much better even with WSGI (unless you're using WSGI scripts) Much easier to maintain application state this way in my experience. PHP-FPM doesn't exactly solve this problem, I don't think).
Yah, I come from a PHP background which is probably why I feel this way about Python... Ruby is likely a similar story since Gunicorn is a fork of Unicorn