How to host your Web Application on

In this tutorial, we are going to learn how to host your local Python web application on an online server provider. We are going to use in this tutorial.

Python Anywhere is a free hosting service to set up our blog application on the internet.

If you are interested to learn how to create web application using Python follow this below tutorial series link:

Django web application – simple blog website using Django tutorial

Signing Up on PythonAnyWhere


Set up for a beginner’s account.

host your python web application on pythonanywhereWhen adding your username, keep in mind that your blog’s URL will take the form, so choose either your own nickname or a name for what your blog is all about.


Creating an API token – PythonAnyWhere

After creating your account, go to the Account section in the top right corner

Python Anywhere API token

then select the section “API token“, and press the button saying “Create new API token”.

API token python

Configuring Site on PythonAnyWhere

Come back to the main website and start a bash command line.

Python Anywhere - configure site

Python Anywhere provides a helper tool that pulls down your code from GitHub, and then configure it to start serving it as a web application.

To install it, run the command :

pip3.6 install --user pythonanywhere

Now, run the command to use the GitHub code on your profile and set it up :<your-github-username>/my_blog.git

Then, initialize a SuperUser for the website :

python createsuperuser

Hurray! The site is live now.

Click on the Web section to get a link to the website.


Hope! You have understood the procedure well enough.

Feel free to drop any doubts you face in the comments section below

Also, have a look at other posts :

Introduction to Git and creating your Git repository

What is GitHub and How to push your code on GitHub ?

Leave a Reply

Your email address will not be published. Required fields are marked *