Many systems expose a web-based API. Automating web-based APIs is easy with the requests library. It is designed to be easy to use while still exposing a lot of powerful features. Using requests is almost always better than using Python’s standard library HTTP client facilities.
7.1 Sessions
As mentioned before, it is better to work with explicit sessions in requests. It is important to remember that there is no such thing as working without a session in requests; when working with the “functions,” it is using the global session objects.
This is problematic for several reasons. For one, this is exactly the kind of “global ...