Thank you for your interest in contributing! This repository showcases single-file Python scripts using the GitHub Copilot SDK.
- Keep it simple — Each sample should be a single
.pyfile - Follow conventions — Use snake_case for filenames, type hints, async/await patterns
- Make it runnable — Ensure
python samples/your_script.pyworks immediately afterpip install -r requirements.txt - Document it — Add clear docstrings and usage examples
- Update README — Add your sample to the table in README.md
#!/usr/bin/env python3
"""
Brief description of what this sample does.
"""
import asyncio
from copilot import CopilotClient, SessionConfig
async def main():
"""Main entry point."""
# Your code here
pass
if __name__ == "__main__":
asyncio.run(main())- Type hints — Use them for function signatures
- Error handling — Include try/except where appropriate
- CLI args — Use
argparsefor command-line arguments - Async — Use
async/awaitpatterns consistently - Comments — Explain complex logic, not obvious code
- Install dependencies:
pip install -r requirements.txt - Run your script:
python samples/your_script.py - Verify it works end-to-end with real Copilot calls
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-sample-name - Add your sample in
samples/ - Update README.md to list your sample
- Test it locally
- Submit a PR with a clear description
Open an issue for discussion before starting work on major changes.
Be respectful, constructive, and helpful. This is a learning and demonstration project — all skill levels are welcome.