views:

2234

answers:

4

I am planning a small, simple website to showcase myself as an engineer. My preferred language is Python and I hope to use it to create my website.

My pages will be mostly static, with some database stored posts/links. The site will be simple, but I would like to have freedom in how it operates. I plan on using CSS/JS for the design, so I really just need an easy way to throw a small amount of content around.

Some frameworks I have come across:

  • Flask
  • cherry.py
  • Pinax

Recommended Framework:

  • Werkzeug
  • Bottle
  • web.py
  • Zope 2
  • repoze.bfg
  • Pylons
  • Hyde (Static HTML)

Are there any suggestions? Does anyone have any experience with Python on small/hobby websites? Any hindsight advice?

+23  A: 

Django powers over 80% of Python-coded web sites, according to some estimates. While it's definitely way more powerful than you need, there is something to be said for just going with the flow.

At the other extreme, bare Werkzeug (with WSGI) is quite usable... and Flask is not much more than that (plus Jinja2, but that's quite OK for templating after all). Me, I'd go for this.

Alex Martelli
Flask or Werkzeug?
mvid
@mvid, myself, I've used bare Werkzeug so far, but Flask is by the same author and, reading up on it, seems simple but worthwhile added value on top of Werkzeug, so Flask is what I'd suggest trying (tipfy's what I'm trying myself, but that's for App Engine only).
Alex Martelli
Just wrote my first Django website after using a variety of homebrewed and mini frameworks. It can be difficult to get started but once you get all the fundamentals setup the rest of development is incredibly rapid. I now highly recommend it.
Jake Wharton
Alex Martelli
I have recently discovered Flask and loving it; very easy, lightweight, fast and fun. Django now seems too cumbersome for most of my smaller projects. ... for what it's worth
Jeroen Dierckx
@Alex: +1, but I'm curious where you got the 80% number from?
sdolan
@sdolan, there's a site trying to guesstimate all technologies powering sites on the open web, but I just can't recall the site's name (sorry!) -- that's why I just said "some estimates" in my A.
Alex Martelli
@Alex: Thanks for getting back to me. I found http://trends.builtwith.com/, but Django wasn't listed there. If I stumble across it in the future, I'll comment here.
sdolan
@sdolan, yeah -- it wasn't that one, a similar one tho (and it allowed "digging down" per fundamental technology to find e.g. breakdowns among various frameworks for a given language).
Alex Martelli
+3  A: 

Take a look at web.py and bottle - both small enough to be simple, and obfuscate complexity enough to make your development rapid.

Alternatively, there is Hyde (see github) that generates static pages for you - depending on how dynamic the data you're displaying is.

Ben Hughes
+3  A: 

Here's a list of Python web frameworks: http://wiki.python.org/moin/WebFrameworks - each of them can be used to build such a site, the choice mostly depends on personal preferences.

If I needed the site up and running in 10 minutes I'd probably use Zope 2 - it's well suited for the model you're describing (semi-structured CMS-ish content with bits of coding here and there).

Otherwise I'd use repoze.bfg or Pylons (Werkzeug must be similar but I don't have any experience with it). I'd only consider Django if I was planning to use its automatic admin or third-party modules - otherwise it feels a bit affected by "Not Invented Here" syndrome which forces you into Django-way of doing things once you chose it.

Sergey
+1  A: 

If you want to showcase yourself as a python webdeveloper, then I think the answer is clearly Django. It is the one that is used most throughout the web. If you want to just build a quick website that shows your engineering chops in something other then webdesign/coding then I highly recommend Flask. It is amazingly simple to get up-and-running.

JoshFinnie