from Hacker News

Why arent there any courses teaching web development in Python?

by deepskyai on 11/7/23, 12:06 PM with 12 comments

Before anyone jumps in and says “because front end is built in JS” hear me out:

- There are lots of web development frameworks in python: Pyscript, Anvil, Reflex, Atri, JustPy and many, many more

- The docs or mini courses for these jump straight into “how to do a web thing that we already know but in Python”

- No course out there teaches the basics of the web like fetching, async, dom manipulation with Python not even the PyScript stuff which has a mandate to teach people web.

- I had to learn JS before i could understand the courses that teach the basic concepts of the web

So HN, why is it this way?

  • by fermigier on 11/8/23, 9:16 AM

    "Web development" means many different things to different people.

    I believe a sensible approach, for some (including me), is:

    1. Learn back-end web programming (HTTP request/response model, templating, sessions, security, the REST architectural model, ORM...) with your framework of choice (Django, Flask, Litestar, Sanic...). There are many tutorials and books around.

    2. Learn HTMX (https://htmx.org/). A fine book is https://hypermedia.systems/ (it will also teach you the fundamental, framework-agnostic, principles of 1.)

  • by hiccuphippo on 11/8/23, 5:29 PM

    It seems you are only talking about python in the browser. I'd guess anyone wanting to use python in the browser already knows python and already uses javascript in the browser and wants to get a way to do browser stuff with the language they like. I don't think a beginner that doesn't know either language would care to go through the hoops to get python working on the browser.
  • by mtmail on 11/7/23, 12:29 PM

    Sounds like you found an underserved market opportunity.
  • by wtbdtloopsody on 11/7/23, 7:24 PM

    industry AND community standards and there's tons of web dev stuff you'd need to tinker together yourself in PyXYZ that is already available in huge variety in JS.

    there's just no need and no advantage of Python in Web Dev except maybe fun and the love for "quick and dirty" ...

    but if you keep adding and building, they will come ;]

  • by rbanffy on 11/7/23, 12:15 PM

    > dom manipulation with Python not even the PyScript stuff which has a mandate to teach people web

    I am not sure what you mean here. There’s not really much space for Python in the browser. When you mean using Python to scrape web pages, there are specific courses. The HTML web frameworks output usually has very little, if any, front-end code in tutorial in order to make the example simple, because the goal is to teach rather than provide real-world examples.