4 ms·
Ok, so… I’m looking at the Python example with HTTP Endpoints and I already have questions. Why both functions are inlined and why FastAPI is used at all. I’m
by xlii 2y ago
Ok, so… I’m looking at the Python example with HTTP Endpoints and I already have questions.
Why both functions are inlined and why FastAPI is used at all. I’m also not seeing any network bindings. Is it bound to local host (doubt it) or does it immediately bind to all interfaces.
It’s a 3 second thought from looking at Python code that I know only enough to write small and buggy utilities (yet Python is widely popular - so LLM have ton of data learned in). I know it’s a demo only but this video strengthen my feeling about drop of critical thinking and a raise of McDonalds productivity.
McDonalds is not bad: it’s great when you are somewhere you don’t know and not feeling well. They have same menu almost everywhere and it’s like 99% safe due to process standardization. Plus they can get you satiated in 20 minutes or less. It’s still type of food that you can’t really feed on for long; and if you do, there will be consequences.
The silver lining of it is that it most likely cut off all people from the field who hate the domain but love the money, as it’s exactly the problem it automatizes away.
- ramraj07 2y agoCould you clarify what your problem with FastAPI here is? Also did I understand correctly that you’re not very well versed with python in general but still decided to criticize the decisions the model and the author made in that language?
- xlii 2y agoI have doubts about the design and on spot decision of using FastAPI. It’s kind of chicken and the egg problem. If author knows FastAPI then it’s great, but if not then should verify its applicability. It might not be the choice they’d make and need to verify both library and other solution if it’s not the fit. If I’d get suggestion like that I’d immediately go to documentation because I don’t know consequences. Experienced person might make a conscious choice, unexperienced - implicit one which might not work in context. As for the design - I’m against inlining handlers. It’s not like Python is the only language that allows it, but I would suspect consequences are very similar. But maybe that’s idiomatic thing. Had this be coming from documentation I’d had much more faith than a random LLM suggestion.
- ramraj07 2y agoFastAPI is a nobrainer choice of webserver backend for a python API server in 2024. If you’re not aware of that, then you really shouldn’t be commenting on this topic.