Review: PythonAnywhere

There is a missing middle in our approaches to sharing servers.

PythonAnywhere Mug

Limited edition hipster mug
I liked PythonAnywhere before it was popular!

On one end we have static web hosting where all users are doing the same thing so we can install and run one copy of Apache for all users, that works up to the point of cgi scripts and php. The other end of the spectrum is to buy a server and that extends down to virtualized servers. Between there is a gap where there is some commonality to the user’s needs, but little support. Engine Yard has their RailsEngine platform for Ruby and there are a few Python offerings of which PythonAnywhere is one.

PythonAnywhere starts from the assumption that you will be running Python. They also assume that you’ll want to use Python interactively at least sometimes, probably a lot. The operation of PythonAnywhere is to login and select a console. You can choose from your existing consoles or start a new one in your choice of:

* Python: 2.7 / 2.6 / 3.2
* IPython (0.12): 2.7 / 2.6 / 3.2
* PyPy (1.6): 2.7
* Bash
* MySQL

Once you select a console it will open directly in your browser through a combination of JavaScript and Flash. It tries a few different connection mechanisms so it does work even without Flash and through some but not all firewalls. It also works on Android 4 and supposedly iOS, though you should get a keyboard without auto-complete or an external keyboard . This kind of quick access to different runtimes is great for testing, but the consoles are also persistent, so you can start working on one device and switch to another.  You can prepare a session on your desktop and then connect to it from your laptop for a presentation, or rely on iPython’s history feature to recover even if it gets restarted. The other payoff is sharing, any console can be shared–no account needed for the recipient. Sharing is real time and persistent a class can share the teacher’s console passing control from student to student to answer or ask questions.

Surrounding the console features PythonAnywhere provides file hosting with a basic JavaScript IDE which will let you run scripts or launch them to a console. If you use Dropbox you can set it to sync folders or use your choice of version control to check out projects.

For non-interactive hosting you can go simple with scheduled tasks or hook in a wsgi application.  Because the servers are virtualized via Amazon’s ec2 you cannot run a server directly.  Free users can have username.pythonanywhere.com addresses, and paying customers can point their own domains at the service.  That’s pretty much the way of things when it comes to paying, PythonAnywhere is on a freemium model, most of what you need is in the free tier, unless you’re doing something that you’ll have to admit is on the heavy side.  The only real hassle to the free tier is that they’ve had to restrict http access to a whitelist of sites to prevent misuse.

To get started with PythonAnywhere just sign up at https://www.pythonanywhere.com/ with the free account you can get two consoles, a database, and everything you need.  Sign up is faster than installing python locally.  Even from the basic account you can share a console, so this makes a great tool for learning and exploration.  Give it a try next time you’re experimenting or collaborating, try it on a desktop or laptop before trying to use it on a mobile device where it can be a bit more finicky.

Disclaimer, I have been involved in the PythonAnywhere Beta test and they have thanked me with account upgrades and free gifts like the above mug.  MakerBar uses a PythonAnywhere account that they gave me as a thank you for help testing.  No one from PythonAnywhere nor Resolver Systems was contacted to prepare this review.

Tags: ,