Can I put a Python editor in API documentation

I was working on API documentation and thought it would be really cool if people could demo their code within our API documentation. Setting up an IDE is a real barrier to entry.

W3schools has a great interface where folks can learn by doing. Whereas our team's API documentation (meant for people who sometimes haven't used Python before) just is in markdown.

I have tried uploading the docs to Replit (an online IDE) but was wondering if there was a better way.

Really appreciate your time!

clear example of "Learning by doing coding"

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum