psf/requests — reverse-engineered prompt
Reverse engineered prompt
Build me a clean Python library that makes sending web requests feel simple for normal developers. I want to be able to do things like get a URL, post JSON, upload files, use authentication, manage cookies, set timeouts, stream downloads, and read the response as text or JSON without dealing with low level HTTP details.
Make the API feel friendly and obvious, with simple functions for common requests and a reusable session object that remembers cookies and uses connection pooling. It should handle redirects, headers, query parameters, SSL verification, compressed responses, proxies, and basic or digest auth in a sensible way.
Please include solid tests, clear docs with examples, and package it so it can be installed with pip. Keep the code readable and reliable, aimed at Python 3.10 and newer. Look up current Python packaging and HTTP best practices online if you need to.
Want more depth? Deep Reverse