Skip to content

[TEST, do not merge] Sample code for: Python Sandbox: Run Untrusted Code in Docker and MicroVMs - #903

Draft
realpython-bot wants to merge 2 commits into
masterfrom
python-sandbox
Draft

realpython-bot wants to merge 2 commits into
masterfrom
python-sandbox

Conversation

@realpython-bot

Copy link
Copy Markdown
Collaborator

Where to put new files:

  • New files should go into a top-level subfolder, named after the article slug. For example: my-awesome-article

How to merge your changes:

  1. Make sure the CI code style tests all pass (+ run the automatic code formatter if necessary).
  2. Find an RP Team member on Slack and ask them to review & approve your PR.
  3. Once the PR has one positive ("approved") review, GitHub lets you merge the PR.
  4. 🎉

Warning

Throw-away pipeline test. This PR comes from a test run of the post-materials pipeline on CMS post 1104 (a test copy of the tutorial). Do not merge. Please close it after the test is reviewed.

Code examples for the Python Sandbox: Run Untrusted Code in Docker and MicroVMs tutorial. Files live in the python-sandbox/ top-level folder, named after the article slug.

Generated from the tutorial markdown with the post-materials skill. The Python files and rootfs/sbin/run-job are byte-for-byte copies of the article's code blocks.

Notes:

  • python-sandbox/ruff.toml extends the root pyproject.toml and sets quote-style = "preserve". Without it, ruff format --check would rewrite the PEP 701 nested same-quote f-string at the end of compare.py (f"...{result["exit_code"]}..." to result['exit_code']), which would diverge from the article.
  • requirements.txt pins RestrictedPython==8.5, matching the post's dependencies field and the install command in the article.

🤖 Generated with Claude Code

bzaczynski and others added 2 commits October 21, 2026 13:51
…roVMs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ruff and the CMS preflight disagreed on quote style for the nested
f-string in compare.py. Unpacking the result avoids nested quotes, so
the folder-level ruff.toml override is no longer needed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants