Learn Python Context Managers

Originally posted on 2020-04-04 A real problem I encountered While learning to use Python Context Managers, I encountered a neat use case for them. At the time I was writing a data pipeline that was heavily querying an API and I would often quickly reach the API quota limits and the script would abruptly quit. My initial solution was to catch the exception and implement a loop that would try again after a time delay....

March 5, 2023 · 10 min · Evgeny Roskach