Skip to content

Sample code for: GitHub Copilot SDK: Put a Coding Agent in Your Python Code - #919

Merged
realpython-bot merged 4 commits into
masterfrom
github-copilot-sdk
Nov 30, 2026
Merged

realpython-bot merged 4 commits into
masterfrom
github-copilot-sdk

Conversation

@lpozo

@lpozo lpozo commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

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. 🎉

Code examples for the GitHub Copilot SDK: Put a Coding Agent in Your Python Code tutorial. Files live in the github-copilot-sdk/ top-level folder, named after the article slug.

Generated from the tutorial markdown with the post-materials skill, then verified locally before pushing: every script ran against a live model (ci_agent.py exits 1 on project/shopping.py and 0 on project/test_shopping.py, as the tutorial shows), and the folder passes the repo's Ruff checks.

🤖 Generated with Claude Code

lpozo and others added 3 commits October 23, 2026 20:40
…n Code

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- Read the token into a variable before creating the client
- Use Claude Haiku 5.5 in every script
- Simplify the tool's parameter model in issue_agent.py
- Rename total()/average() to compute_total()/compute_average()
- Pretty-print tracker/issues.json

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

@realpython-bot realpython-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed against the tutorial (CMS post 2371): every code block matches these files, requirements.txt pins match the article's install command, issues.json gives the article's output, and CI passes.

@realpython-bot
realpython-bot merged commit 8475579 into master Nov 30, 2026
1 check passed
@realpython-bot
realpython-bot deleted the github-copilot-sdk branch November 30, 2026 22:39
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