> The reliability and robustness of SQLite is achieved in part by thorough and careful testing. As of version 3.23.0 (2018-04-02), the SQLite library consists of approximately 128.9 KSLOC of C code. (KSLOC means thousands of "Source Lines Of Code" or, in other words, lines of code excluding blank lines and comments.) By comparison, the project has 711 times as much test code and test scripts - 91772.0 KSLOC.
Plus they have a whole page on their site about testing [1]. Which is more then you can say about a lot of open source projects.
There are a lot of ways to judge this, but obvious candidates would be GNU Emacs, the GNU coreutils packages, etc., and the Linux kernel itself. (Probably also the BSDs, though I don't know these.)
Doesn't answer the question why nobody has build an interface like the first example over the low-level libcurl bindings, or if someone has done so, why it hasn't been more popular.
I'd guess: because distributing packages with native dependencies is sort of a a pain, and was way worse in the past, especially cross-platform, and thus python-only packages are preferred. Leaves open why libcurl bindings weren't choosen for stdlib.
Since we're on the topic of code quality, this example is an incredibly strong indication that you should be using an interface.
And while the requests library might be shorter/easier, it doesn't offer nearly the guarantees that it will exhibit the expected behavior nor the feature flexibility that libcurl does.
There is a very short list of projects that have had more engineering effort put into them than libcurl. Single digits. It's incredibly robust and battle-tested. Just about everything you could want to do with it performs as expected and is well-supported. On top of that, its performance is very good.
We're literally in the business of building on the work of others. Avoiding libcurl seems like an incredibly naive choice to me.