Adarsh Divakaran

@adarshd.dev

Python Developer Advocate at SerpApi Microsoft MVP in Python Blog: https://blog.adarshd.dev

Python Gem of the Day: 💎 Interlock: github.com/bagowix/inte... - uv add interlock-cb - Circuit breaker implementation for network calls ( temporarily stops calls to a failing service, helping prevent repeated failures and giving it time to recover). - Supports FastAPI, Requests/httpx, and more.

GitHub - bagowix/interlock: Circuit breaker for Python: sync + async in one class, sliding-window rate, slow-call detection, Polly-style resilience pipeline, type-safe API

Circuit breaker for Python: sync + async in one class, sliding-window rate, slow-call detection, Polly-style resilience pipeline, type-safe API - bagowix/interlock

github.com

AI Gem of the Day: 💎What Codex Actually Sends to the Model: www.0xkato.xyz/what-codex-a... A researcher pointed Codex CLI to a local server to see what requests it sends to the model. The post explains how Codex handles default tools, MCP servers, compaction, etc, inspected via real requests.

What Codex Actually Sends to the Model

I recorded the requests Codex generated for a 16-character prompt and measured what changed as it loaded instructions, exposed tools, read files, ran commands, received images, and compacted its histo...

0xkato.xyz

What really happens when you do `my_dict[key]` in Python? 🐍 In this session, Akshay M, Software Engineer at Google, will take us under the hood of Python’s dict and explore how they actually work behind the scenes. 🗓️ Date: 16 April, 2026 📍 Venue: Online 🔗 Register: ddp.py3.in

Bild

I’ve joined @serpapi.com as Python Developer Advocate. 2026 feels like the year of AI agents, and agents need reliable real-time information to be useful. SerpApi gives developers search data from Google, Bing, Amazon, and more. Building agents & need search data? Let's connect.

Thanks to open-source tools like `python-chess` and Stockfish, anyone can build their own chess analysis program. I'll be walking through how to do this live at @pycon.us poster session this weekend. Let’s write some code, analyze some blunders, and build something fun together. ♟️

Bild

#Python Gem of the day: 💎: nedbatchelder.com/blog/202411/... by @nedbat.com for loops can assign to dict keys (and much more).. 𝚙𝚊𝚛𝚊𝚖𝚜 = {} 𝚏𝚘𝚛 𝚙𝚊𝚛𝚊𝚖𝚜["𝚙𝚊𝚐𝚎"] 𝚒𝚗 𝚒𝚝𝚎𝚛𝚝𝚘𝚘𝚕𝚜.𝚌𝚘𝚞𝚗𝚝(): # 𝚝𝚑𝚒𝚜 𝚠𝚘𝚛𝚔𝚜

Loop targets

People were surprised by my example of assigning to a dict item in a for loop. Here’s more explanation.

nedbatchelder.com

‪#Python Gem of the Day: Pyzzels by Oskar Eriksson 💎https://pyzzles.gptengineer.run/ Python puzzles where we are given test files and need to write solutions to satisfy the tests.

Thread local data in #Python Since threads in Python share the memory space of their parent process, we might need to define thread-specific variables for specific use cases to avoid unintended side effects. Read at: blog.adarshd.dev/posts/thread...

Thread Local Data in Python

Since threads in Python share the memory space of their parent process, we might need to define thread-specific variables for specific use cases to avoid unintended side effects.

blog.adarshd.dev

Evolution of `sort` in #Python and the role of `cmp_to_key` This article from my "Python in the Wild" newsletter discusses the evolution of sorting from Python 2 to 3, and features an open-source example illustrating the usage of `functools.cmp_to_key` for sort operations.

Evolution of the sort in Python and the Role of functools.cmp_to_key

In Python, the sort method and the sorted callable are commonly used for sorting operations. sort is a list method which modifies the list in-place, whereas sorted takes an iterable as its first argum...

blog.adarshd.dev