3 ms·
> If you're doing Python web development and you have no idea what WSGI or ASGI are ASGI may be new to some, but... how is it possible to do Python web develop
by lucideer 4y ago
> If you're doing Python web development and you have no idea what WSGI or ASGI are
ASGI may be new to some, but... how is it possible to do Python web development without first learning what WSGI is? I haven't done much Python dev but WSGI seems to be the standard way - what's the less optimal alternative that people might end up with?
- dec0dedab0de 4y agoThere were other solutions 10+ years ago, but they're all dead. I guess the comment you're replying to was nervous because when people do python things in another language they sometimes don't follow python standards.
- giancarlostoro 4y agoSpot on! Sometimes even in Python people reinvent the wheel because they either had no idea something existed already, or they didn't like it for whatever reason. It also means writing your web framework differently depending on how their unique solution works, it does look like they did roll some enhancements over ASGI (they extended the spec) but the fact it still supports regular Python standards is good enough in my eyes.
- linsomniac 4y agoI assume the situation would be that you are just following a FastAPI or Django or Flask tutorial and putting the pieces together, running gunicorn without really even thinking about WSGI.
- beltsazar 4y ago> how is it possible to do Python web development without first learning what WSGI is? You'll be surprised to find out that there are many software developers who are "fast learners", but actually are shallow learners. Or to put it more kindly, they are not-so-curious learners, i.e. they only learn just enough things they need to accomplish the task at the moment. It's not necessarily a bad trait; but sometimes if you don't learn the fundamentals, it will cost you more (time, effort) along the way.
- vore 4y agoI think it depends how deep into the fundamentals you want to go. If you're building say a shopping cart extension for Django, your time is better spent building within the framework than learning the nitty gritty of WSGI. It's a cost-time trade off and sometimes learning the fundamentals is not worth it when you could be spending more time on working on your actual problem domain.
- giancarlostoro 4y agoI would not be surprised how many Django developers setup WSGI and still have no idea how it works or why it exists, they just pull up a Google article on best practices for deploying Django and follow it to the T.
- cturner 4y agoOver the years, I have built some internal apps by nesting aiohttp in a python process. Usually this starts with me having an existing process and finding I want to add a web interface to it, for example, as a dashboard. What would be the advantage of putting a commodity web server between the application server and the user, rather than having the user’s browser directly talk to aiohttp?
- berkle4455 4y ago> how is it possible to do Python web development without first learning what WSG A vast majority of people who call themselves "python devs" got there by copy-pasting ML scripts from stackoverflow (and now chatGPT) into jupyter notebooks.
- whatever1 4y agoThat is fine, you don’t have to understand the underlying libraries to write useful code.
- detaro 4y agoIt's in the end an implementation detail. You can set up a WSGI server and deploy an app without really knowing or understanding what WSGI actually is, even if the letters appeared somewhere deep in a config file.
- lucideer 4y agoThis comment is long past editing deadline but since most replies seem to have misinterpreted me, I must have worded it very badly, so will clarify: Basic tutorials for Python newbies use wsgi. Copying & pasting from SO without understanding the code you're copying will inadvertently net you a wsgi setup. FastAPI requires wsgi. I wasn't stating that everyone deploying Python has a depth of knowledge of wsgi - I was enquiring as to whether there's some other alternative system people pervasively use for Python web apps, as I assumed everyone was on wsgi (whether they're aware of it or not). TL;DR: by "learning what wsgi is" I just meant "deploying it" not "understanding it in depth"