this post was submitted on 07 Jun 2024
35 points (88.9% liked)
Programming
17374 readers
251 users here now
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities !webdev@programming.dev
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Python can do both scripts and desktop apps no problems
But use type annotations everywhere and make sure your code is always checker clean (with checkin or PR CI hooks). And don't turn off any lint checks through laziness, e.g. docstring checks. Even for a solo dev it's always worth having everything typed, checker clean, and docstrings (even if they only effectively say "this thing really is what you'd assume"). It all saves time and effort in the long and even medium term.
I've worked on serious large scale Python projects and frankly it's been very pleasant and productive, but only with the above conditions.
But what about websites.
I'm writing a web app on Python + HTMX. Little to none javascript involved.
If it's something simple you can check out FastAPI. For more complicated projects involving data models and relationships, check out Django.
May I recommend Litestar over FastApi?
I've heard a word or two about htmx. How's that? Any recommendations on how to start a first project with it?
So many websites out there are built on Django, Flask, etc. (YouTube must have spent a decade using Python, Instagram, Threads etc. all use Python and optimize as they need).
It can do back ends with django and flask but the only choice for front ends is javascript or something like htmx
WASM
Yeah, I've been using Rust with Leptos and Axum for a website I've been working on. Works great tbh. I don't even know JS.
Yeah but be prepared for a lot of pain if you want to distribute your app. Python tooling/infra is abysmal.
True