PythonAnywhere is an online service for writing, running and hosting Python programs and web applications. Instead of running everything on your own Windows, macOS or Linux computer, PythonAnywhere provides a Python environment that runs on its servers.
One particularly useful feature of PythonAnywhere is the ability to host a Python web application so that other people can access it over the Internet. For example, an application created with the Flask web framework can be deployed to PythonAnywhere and given a public web address.
PythonAnywhere can therefore be useful when you have developed a Python application on your own computer and are ready to make it available online.
PythonAnywhere by Anaconda
In June 2025, Anaconda acquired PythonAnywhere. You may therefore see the service branded as PythonAnywhere by Anaconda.
Anaconda and PythonAnywhere provide different but related tools for Python developers. Anaconda is well known for its Python distribution, the Conda package and environment manager, Jupyter and data science tools. PythonAnywhere provides an online environment where Python code and Python web applications can run.
If you are interested in Anaconda, see my article on Anaconda, Conda and Python environments.
What Can You Do With PythonAnywhere?
PythonAnywhere provides several tools through a web browser. You can create and edit files, open a Bash console, install Python packages, create virtual environments and configure web applications.
Some common uses include:
- learning and experimenting with Python
- running Python scripts
- using a Bash console through a web browser
- hosting Flask web applications
- hosting Django web applications
- working with Python packages and virtual environments
- deploying code stored in GitHub
Hosting a Flask Application
One reason you might use PythonAnywhere is to put a Flask application on the Internet.
During development, a Flask application will often run only on your own computer. You might start the application and access it using an address such as 127.0.0.1 or localhost. That is useful for development, but other people cannot normally access the application.
PythonAnywhere provides a server environment where the Flask application can run continuously and be accessed through a public web address.
This makes it possible to develop and test an application locally and then deploy it to PythonAnywhere when you want other people to see it.
Using GitHub With PythonAnywhere
GitHub works very well as part of a PythonAnywhere workflow. Your application’s source code can be stored in a GitHub repository and then cloned to PythonAnywhere.
A simplified workflow might look like this:
- Make changes to the application on your computer.
- Test the changes locally.
- Commit the changes with Git.
- Push the changes to GitHub.
- Open a Bash console in PythonAnywhere.
- Move to the application’s project directory.
- Run git pull to retrieve the latest code.
- Reload the web application.
This gives GitHub an important role between your development computer and the public application:
Your Computer → GitHub → PythonAnywhere → Public Website
Updating Your Application
Once an application is running on PythonAnywhere, updating the code can be quite simple.
After pushing your latest changes to GitHub, open a Bash console in PythonAnywhere and change to the directory containing your project.
You can check the current Git status:
git status
Then retrieve the latest changes from GitHub:
git pull
If the pull is successful, the updated files will now be on the PythonAnywhere server.
Don’t Forget to Reload the Web Application
There is one additional step that can be easy to forget. Updating the files on the server does not necessarily mean that the running web application immediately starts using the new code.
In PythonAnywhere, go to the Web page for your application and click the green Reload button.
The basic update procedure is therefore:
Push to GitHub → git pull on PythonAnywhere → Web → Reload
If git pull worked but your public website still appears to contain the old code, checking whether you remembered to reload the application is a good first troubleshooting step.
What About the Database?
There is an important distinction between your application’s code and its data.
For example, a Flask application might use a SQLite database. If that database is deliberately excluded from the Git repository using a .gitignore file, running git pull will update the application code but will not replace or update the SQLite database.
This can be desirable because the database used by the live website may contain different data from the development database on your computer.
However, it also means that database changes need to be handled separately. It is important to understand which files Git is managing before assuming that a GitHub deployment will update everything in the application.
PythonAnywhere Consoles
PythonAnywhere provides browser-based consoles. A Bash console is particularly useful when managing a web application.
You can use familiar commands such as:
pwd ls cd git status git pull
This means that many tasks normally performed in a terminal on your own computer can also be performed on the PythonAnywhere server through your browser.
Virtual Environments
Python projects commonly use a virtual environment to keep their Python packages separate from those used by other projects.
For example, one Flask application might require one set of packages and versions while another application requires something different. Keeping these dependencies in separate environments helps prevent conflicts.
PythonAnywhere supports Python virtual environments, and a web application can be configured to use the virtual environment associated with the project.
PythonAnywhere and Local Development
Using PythonAnywhere does not mean that you have to develop your entire application in a web browser.
A convenient approach is to continue developing locally using tools such as Visual Studio Code. You can run and test the Flask application on your own computer, use Git to record your changes, push those changes to GitHub and then pull them into PythonAnywhere.
This separates the development environment from the public production environment while GitHub helps keep the source code synchronized.
Why Use PythonAnywhere?
PythonAnywhere can be particularly attractive to someone learning Python web development because much of the server infrastructure is already provided. You do not need to begin by configuring your own Linux server just to put a small Flask application online.
At the same time, using PythonAnywhere introduces you to several important concepts in real-world software development: hosting, deployment, Git repositories, virtual environments, server consoles, application configuration and the distinction between development and production environments.
For a beginner who has moved beyond writing individual Python programs and wants to make a Python web application available to other people, PythonAnywhere can be a useful next step.
More About Python, GitHub and Web Development
PythonAnywhere also connects naturally with several other topics covered on Begin Coding Now, including Python, Flask, Git and GitHub, virtual environments, SQLite and Anaconda.
Together, these tools demonstrate how a Python program can progress from code running on your own computer to an application that other people can use through a web browser.
