Web development in Python


I want to learn Web development from Python.
Please note, am new to Python itself and also to web development.
My prior experience is in VBA, not sure if many of you heard of this.

My request is, how should I proceed. What should I focus on to learn web development.
What are the essentials that I must know for web development in Python.
Your recommendations will help me to check if I am on right track.

Web development starts from serving content using http server (e.g. nginx, apache). The browser sends a request to such a server software and said server software serves either a static (already existing content) or executes some program to process such a request. A program may be written in various languages, python being one of them. The old way was “cgi”, and standard python is “wsgi”. Python has a wsgiref module that you can use to build a simple application (basically a function that receives a request object).
You can build applications on this using any libraries you need (for databases, cookies/session, authentication, generating output formats /html, xml, json/ and so on). If you arrive at some generic (reusable) skeleton of such an app, you can refer to it as “framework”.

Now - there are plenty of frameworks in python ecosystem - the “microframeworks” and the big “batteries included frameworks”. The microframeworks are small architectures (e.g. wekzeug or flask (the latter being an abstraction of the former). The big framework like django or pyramid are very complex, include many things tightly coupled together. In big frameworks you do not choose libraries - frameowkr authors have decided this for you.

So the options are these - you can learn using big frameworks (like jumping into a vast ocean), or trying with small things and apps (drop by drop).
If you have time, will and curiosity, I’d suggest looking into some microframeworks or just trying to build a simple app using wsgiref.
Otherwise - if you choose big frameworks first - you’ll be mostly trying to figure out how to declaratively “configure” some behavior in a complex system, which probably also does some things wrong (e.g. django and databases).


Thank you for this formidable response, which I appreciated very much.


@pymc thanks a lot for the help. This is really good. Have a nice day ahead. :slight_smile:

@Maroloccio I agree with you. :slight_smile:
Have a nice day ahead.

The best is by doing real world web development in my opinion. You can run Python online or do it on localhost. I recommend developing online, because that builds your portfolio that you can later use for jobs or getting customers.

Essential is that you know the Python language concepts (loops, functions etc). From there, you can start creating web apps and learn everything by practice.

Python comes with many frameworks (modules) that let you develop web apps: Flask, Django, web2py, bottle and others. I think Flask and bottle are good starting points, for their simplicity.

You can go really low-level and learn about the HTTP protocols, client-server architecture, build your own server and so on. But for basic Web Apps you need a Web Framework and learn html/css and perhaps sql.

1 Like

Hi @Paul , thanks a lot for the help. Have a nice day ahead. :slight_smile:

I’m a Python newbie too and use Python for web development. One of the main complains I heard over and over again from my colleagues about Python is that it lacks sophisticated CRUD tools for web-based data manipulations. So I decided to write a simple python datagrid library, essentially a wrapper for jqGrid specifically for creating datagrids easily with just two lines of code.

It’s called PythonGrid. It’s free and open source on Gthub -link: https://github.com/pycr/pythongrid.

It supports Flask at the moment. Django is on the roadmap. Maybe it will help you!