Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Python web development
19 points by amourgh on July 8, 2011 | hide | past | favorite | 16 comments
Hello guys,

    I would like to develop a website with python,
now i'm learning it via shell.i want to learn it using files like in c++,or asp.net what are some books that i can read to learn python web development? what are some tools to work with html and python. what are the databases that work with python well?


Depending on what you are planning on doing then it would be worthwhile to at least checkout the following:

        - http://flask.pocoo.org/ or http://webpy.org/ as simple lightweight alternatives to django
        - gunicorn or uwsgi as a wsgi server
        - supervisord for controlling processes
        - mongodb, redis, sqlite3 all have fairly complete and easy to use python apis


bottle.py is great, mongodb is tarpit, nginx is a great server to throw in to the mix.


tanky you andybunday,will check


Definitely check out Django - the documentation includes a great tutorial that will guide you through developing a web site. Well written and easy to follow.

For something a little more minimal, try google app engine - their getting started guide is a very simple one form web app: http://code.google.com/appengine/docs/python/gettingstarted/


I'm no authority on the subject but Django seems like the big player when it comes to Python. I also believe they've got a free book walking you through it, but again I have no clues beyond that.

There is also some stuff at the end of www.learnpythonthehardway.org focusing on web dev but it doesn't use Django.

Also, I imagine what ever text editor you used for other things, e.g TextMate or Emacs, could work well here too. I think maybe Eclipse will do plugin because, after all, there's usually a plugin for everything with Eclipse.

P.S keep me posted on how you get on :)


thank you jwdunne. what are some books that can do web dev with python.

for example with asp.net,working with vs .net simplifies things,html is separated with codebehind(c#)


The Django Book

http://www.djangobook.com/en/2.0/chapter01/

From the intro:

If you don’t have experience programming in Python, you’re in for a treat. It’s easy to learn and a joy to use! Although this book doesn’t include a full Python tutorial, it highlights Python features and functionality where appropriate, particularly when code doesn’t immediately make sense. Still, we recommend you read the official Python tutorial, available online at http://docs.python.org/tut/. We also recommend Mark Pilgrim’s free book Dive Into Python, available at http://www.diveintopython.org/.


I really recommend just reading the Django docs: https://docs.djangoproject.com/en/1.3/

They are truly magnificent.


OKi thank you


Easy simple ways that I can think of:

  - look up CherryPy - It's pretty simple to get started and
    a good way to learn something about both web servers and
    websites.

  - you could also check out learn python the hard way 
    (2nd edition) toward the end it has some exercises on
    setting up a website using a framework based on web.py

    http://learnpythonthehardway.org/book/ex50.html

  - of course, Django is the most popular framework and so
    will also have the most documentation.


You can also consider using pyramid web framework. http://pylonsproject.org/

When it comes to databases I would advice using PostgreSQL but I guess anything will work fine, so you may stick to what you know best.


you can try http://mongrel2.org/ with python, look for a simple template system like http://www.cheetahtemplate.org/ and for sql I likes postgresql or can probe some graphdb

some years ago I do some webs with python but i think that nodejs or lisp is better for web develop



+1 for being hilarious sir.


web2py is the only way to go!


"only way to go" ???

I've tried web2py on appengine, its one framework that would eat out your appengine resources very quickly - http://youtu.be/QOhZkoK1Cr8 (that's just two of us hitting the instance, CPU usage - 16% - 20% in minutes)

Other than that, ah we got globals everywhere !! really makes it hard for any sane IDE to understand WTF is going on. Models are loaded alphabetically. I couldn't get unit-tests working sanely (but that might be as the project I work on replaces web2py crud with their own implementation on top of it).

Why not something very simple - Flask or AppEngine. I found writing your webapp in google appengine way more "a good and clean way to go" than web2py.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: