- Developer Tools
Troy Topnik, January 9, 2013
I recently came across a post on ZDNet Cloud Watch by Jack Clark highlighting the new Python 3 support in Heroku. This is of course great news for Python developers who want to start using the next generation of the language on a hosted platform, but the assertion that this puts "the Salesforce-owned cloud ahead of its other platform-as-a-service brethren" bugged me.
For the record, Stackato has had support for Python 3 since early in our Beta releases. We've been tracking core Python 3 releases with ActivePython since 2008, and it was only natural for us to include the most current releases of this runtime in Stackato from the start.
Under the PaaS industry radar
Omitting Stackato in a poll of Heroku's competitors is an understandable oversight. It gets back to a fundamental problem we have when describing why we consider Stackato a PaaS at all. ActiveState doesn't host a service, we built software that lets you run your own. If you're just looking for somewhere to deploy your apps, Stackato probably won't appear on your radar.
However, as more Stackato-powered services start appearing, developers looking for alternatives to Heroku (or Google App Engine, or Engine Yard, or dotCloud) will be discovering the broad range of runtime, framework and data service options available in Stackato.
An example using Bottle
Since I'm not much of a Python programmer, I borrowed someone else's code to show this off. After some quick Googling, I was able to find a little Python 3 WSGI sample app by André Wobst (wobsta) that fit the bill for a sample app (i.e. it works on Stackato with a bit of trivial config). The py3kwsgitest app is just a fork with a small stackato.yml file listing some module dependencies.
name: p3ktest framework: type: python runtime: python32 start-file: app.py mem: 64M requirements: pypm: - bottle - multipart - jinja2 - sqlalchemy
Marcel Hellkamp (aka defnull) has done the hard work of making sure Bottle works with Python 3. I removed the siloed bottle.py and had Stackato install the module with PyPM instead along with the other dependencies (you could get the very latest using pip if you wanted).
This app doesn't do much, but it's a great jumping off point for building a simple web application using Python 3. At PyCon last year, Benjamin Peterson encouraged everyone to start using Python 3 by pointing out all the good things going into it. Many of Python's web frameworks now work with Python 3 (bottle, CherryPy, Pyramid and even experimental support in Django 1.5), so there are fewer and fewer excuses for amateurs like me not to dive in and start building web applications with it.
Trackback URL for this post:
Category: stackatoSHARE THIS: