A Simple Hello World Example on PythonAnywhere
from IPython.display import Image
Image(filename="img/python-anywhere-logo.png")
Let's do the same thing on PythonAnywhere. As mentioned before, this is a real cool hosting platform where you can do a lot of your testing in the cloud for free.
It is also really easy to create a 'Hello World' web application as it is built into the wizards we will use to get started. So, go ahead and sign up for an account.
Sign up for a free account on PythonAnywhere.com and log into it (you will have to confirm your email address).
Setting Up Flask Web Framework
Let's create a web server on PythonAnywhere with the Flask web-serving platform. It is super easy to do. Under the 'Web' tab, click the 'Add a new web app' blue button. And accept the defaults until you get to the 'Select a Python Web framework' and click on 'Flask' and then the latest Python framework.
Image(filename="img/python-anywhere-select-framework.png")
You will get to the landing configuration page, hit the green 'Reload your account.pythonanywhere.com' button and take your new URL for a spin.
Image(filename="img/python-anywhere-reload-and-link.png")
You should see a simple but real web page with the 'Hello from Flask!' message right out of the box
Image(filename="img/python-anywhere-live-web-app.png")
There it is, a real Flask web application running on the Internet! For more examples, see the PythonAnywhere help docs and step-by-step guides at: