Hacker News new | ask | show | jobs
Why arent there any courses teaching web development in Python?
3 points by deepskyai 958 days ago
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?

5 comments

"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.)

Hmmm. Ill have a look. I guess even with PyScript which i would regard as the ultimate front end python solution you have to know HYML
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.
Yeah, im talking about front end really. Browser or mobile platform. I was a beginner and chose pythin because its the easiest. But i just naturally assumed because it was so popular you could build front end apps (web or otherwise) with it. But the courses out there assumed a lot of previous front end knowledge and went straight to the python version of whatever concept.
Sounds like you found an underserved market opportunity.
Yeah, maybe. I though't HN would tell me why its underserved, but I can imagine all the pythonistas out there would eat a course like this up
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 ;]

"there's just no need and no advantage of Python in Web Dev "

I guess, except for the fact that its the easiest language to learn and its the fastest growing language and there are millions of python devs that are super frustrated they can't use any python front end framework because they don't know the basics yet. (Because they're all explained in JS)

> 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.

The question lists at least three frameworks that run Python in the browser.
None of which has anywhere near the traction of any JavaScript-based one, or has one comparable to any of the popular Python back-end frameworks.

Anyway, I think I didn't express myself properly - I used web framework for "backend web framework" the likes of Django or FastAPI.

Yeah - backend is all sorted with python and there's probably just enough basic level course coverage for back end web development concepts in Python. But thats useless if you want to make things people can actually see all by yourself.