Hosted Flasks

serve flask apps side by side

Latest Version on PyPI Supported Implementations Build Status Documentation Status Coverage Status Built with PyPi Template

Hosted Flasks implements the concept of Flask’s Application Dispatching, wrapping it in a module with some operational supporting tools.

It essentially allows for dynamically detecting and loading separate Flask apps from a given folder and serves them side by side as apparently separate Flask apps, under a separate folder or different hostname, yet form a single instance. So, basically, you only need a single “server” to host multiple applications, which is my personal reason for its existence and development.

I have several small Flask apps, which don’t use a lot of resources. For some time I’m enjoying the hosting services of Render. Their free tier is great, but (understandably) “free instances will spin down with inactivity, which can delay requests by 50 seconds or more.”. Their web service pricing is more than reasonable, yet coughing up $7/month for each single little Flask app is a bit too much. So, with Hosted Flasks I can simply bring them all together on a single web service, which doesn’t spin down.

Hosted Flasks adds serveral utilities on top of Flask’s Application Dispatching, to make the virtual hosting as transparant as possible. It can also serves a top-level frontpage-like app, e.g. listing the apps by default.

Contents