HTTP using requests

You've been asked to create a function in your program to upload a CSV extract of the daily data to ABQ's corporate web services, which uses an authenticated REST API. While urllib is easy enough to use for simple one-off GET and POST requests, complex interactions involving authentication tokens, file uploads, or REST services can be frustrating and complicated using urllib alone. To get this done, we'll turn to the requests library.

REST stands for REpresentational State Transfer, and is the name used for web services built around advanced HTTP semantics. In addition to GET and POST, REST APIs use additional HTTP methods like DELETE, PUT, and PATCH, along with data formats like XML or JSON, to present an API with a complete ...

Get Python GUI Programming with Tkinter now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.