Our front-end guru wants to take the plunge and get to know more about our middle and back (and way-back) ends.  There are more than a couple steps down the road to mastery, but the essentials are enough to get you well on your way.  This is a brief (link-farm) guide for someone with some programming experience, but new to Python/Django — heavy on my biases.  Have fun, Tim!

I’ll assume you’re on a Debian-based/derived system and have access to apt-get.  If not, you can probably install all of these by downloading individually or relying on easy_install/PyPI.

Python

These are the resources to get you familiar with the language, culture, and communities.  I personally like to start with books.  I’ve read many, but thanks to Python’s clean/simple design, only a couple are actually necessary to make you proficient.

Install: sudo apt-get install python python-ipython python-setuptools

Tools

If you only get one thing out of this article, let it be this: Use ipython to interactively discover the language and libraries. It’s the most powerful REPL of any language I’ve encountered, and is what really makes Python rise to the top for learnability.

Install: sudo apt-get python-ipython pylint pyflakes pychecker mercurial python-nose pydb python-coverage python-sphinx

  • Interactive play: ipython (try: foo.<tab> and foo? and discover everything!)
  • PyPI installables: easy_install
  • Testing: nose
  • Debugging: pydb (extended Python debugger)
  • Lint/correctness: pylint, pyflakes, pychecker
  • Code coverage: python-coverage

I’ve skipped some really useful tools that go beyond the essentials.  If you’re going to become a Python zealot, you’ll want most of your tools to be written in Python.  These might include Mercurial, Bazaar, Trac, MoinMoin, Sphinx.  We still need investigate the use of Selenium and Twill for web testing.  (We’re now using PostgreSQL for all our database work for several reasons, but one of the most significant is its REPL similar in introspective capability to ipython.)

Django

Our choice of Django was not an easy one, but after some time with Pylons and TurboGears (and even RoR), it was the winner.  It’s also arguably sort of the official Python web framework and does appear to have critical mass (AFAICT).  The Django website lists many of the following resources pretty clearly, but I have found these to be the most useful, and so worth enumerating here.

Install: sudo apt-get python-django python-psycopg2 python-sqlite3

Please include any of your favorite resources for Python/Django newbies in the comments.

Tags: , ,

2 Responses to “Python Web Development Getting Started Guide”

  1. Bernhard H. says:

    I used http://www.poromenos.org/tutorials/python to do some simple things and I think it's a good overview of the really basic python language features. It's probably what you are looking for if you just do some simple scripting or reading some code or if you just need to customize some little things in existing apps.

  2. Thanks for the tutorial link, Bernhard. That's a pretty short tut, but it makes me wonder how many people are trying to use web frameworks without first knowing the language. Seems backwards to me, but maybe lots of folks are trying that. Surely RoR (and its hype) have had many Ruby newbies messing around before really know what's going on. Maybe the same is true in Django. I guess you could get a ways on a small project without necessarily being very proficient in the underlying language.

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>