コンテンツにスキップ
#0129
CodeContainers

A code playground inside your blog post

You write a tutorial about async patterns in Python. The third section says "try changing this to asyncio.gather." Below it, an iframe: a real VS Code instance with the example file open, a terminal, the runtime ready.

A reader clicks. They land in an instance unique to their session. They edit the file. They hit play. They see the output change. They break it. They hit the "reset" button: the snapshot restores, the iframe reloads, the example is back at the start.

This isn't a stripped-down sandbox. It's a real Linux container with whatever Python version your tutorial expects, whatever libs you pre-installed. The reader is reading your post and running your stack at the same time.

Embedding teaches better than telling, and what runs sticks better than what's read.

Readers stop reading code samples and start running them.