Python Prompts Free Prompt

Python Script to Scrape GitHub User Repositories

Write a Python script that fetches a user's public repositories from GitHub API
☆ Save
Prompt
You are a Python developer. Write a script that given a GitHub username, fetches all public repositories using requests and GitHub API. The script must: 1) Accept username, 2) Handle pagination, 3) Extract repo name, description, stars, forks, language, 4) Save to CSV, 5) Handle API rate limits, 6) Provide optional authentication to increase rate limit, 7) Log errors. Add comments.

How to use this prompt

1
Click Copy Prompt above to copy to your clipboard.
2
Open ChatGPT, Claude, Gemini, or any AI assistant and paste the prompt.
3
Replace any [PLACEHOLDER] values with your specific details.
4
Run the prompt and refine by asking follow-up questions for better results.