News for hackers. Stuff that matters.
Re:Show HN: FastAPI: build Python APIs with Go-like speed an... by ilovecaching on Thursday March 21, 2019 @01:24PM (#19454896)
> Yeah, the advantage here over Go would be to have automatic data validation, serialization, and documentation, all based on standards: OpenAPI and JSON Schema. Including automatic web user interface for API documentation.

Golang has libraries for all of the things you mentioned, and web tools to generate APIs based on those schemas. There's no advantage here over Go.

> And maybe the dependency injection system.

Go has interfaces, which facilitates easy DI. No advantage there, and Go sells itself on not having a magic DI framework like the crap Angular 1 had.

> And Python's ecosystem with lots of packages.

Python's ecosystem may have more packages taken as a whole, but Go has a richer web and infrastructure community thanks to being a web first language and growing out of the DevOps community.

> And that Python is the best/main way to do Machine Learning/Deep Learning.

Which means nothing. You shouldn't be running ML in your web server. You use grpc or http to make requests to your ML backend, or generate a config for the web server to consume.

> I personally don't think new asyncio (Python 3.6) is more difficult, but that's more personal taste.

Even if it isn't more difficult, functions have to be colored async which leads to ecosystem fragmentation. It's a huge pita.

Re:Show HN: FastAPI: build Python APIs with Go-like speed an... by lapnitnelav on Thursday March 21, 2019 @01:34PM (#19455034)
Dude, are you a Go bot written to promote Go?

Have you considered that maybe not every one wants have anything to do with the 8th wonder of the world that is Go?

Take it easy pal, let people enjoy things.

Re:Show HN: FastAPI: build Python APIs with Go-like speed an... by dr_wolf on Thursday March 21, 2019 @02:14PM (#19455519)
It looks like some (extremely dedicated) trolling, don't take it seriously. There is certainly nothing wrong in expanding the ecosystem of your preferred language!
Re:Show HN: FastAPI: build Python APIs with Go-like speed an... by ilovecaching on Thursday March 21, 2019 @02:18PM (#19455565)
The way I see it, you're offering no counterpoint and trying to discredit me with a character attack, which makes you the troll.
Re:Show HN: FastAPI: build Python APIs with Go-like speed an... by haolez on Friday March 22, 2019 @10:06AM (#19462594)
I use Python asyncio a lot and I agree with the parent's opinion.
Re:Show HN: FastAPI: build Python APIs with Go-like speed an... by ilovecaching on Thursday March 21, 2019 @01:51PM (#19455234)
Languages aren't flavors of ice cream. Considering the technical arguments of one technology over the other is part and parcel of our profession, and online forums are we go to have these discussions. The person who wrote this, or the people who might look to consume it might not know that better alternatives exist that can meet their requirements and offer them additional advantages.
Re:Show HN: FastAPI: build Python APIs with Go-like speed an... by tiangolo on Thursday March 21, 2019 @02:05PM (#19455400)
> Golang has libraries for all of the things you mentioned, and web tools to generate APIs based on those schemas. [...]

Would you cite some? I would love to see the links, packages, etc. And how could you achieve the same in Go:

Having a single type declaration, get web data validation, serialization, documentation with OpenAPI and automatic clear error responses.

I would love to see it, because before building FastAPI I looked for it in Go-land a lot too, and didn't find it, not even closer to the tools that already existed in Python.