The GitHub Profile Analyzer is a Python script that fetches and analyzes data from a public GitHub user's profile using the GitHub REST API. It generates a detailed markdown report including user information, repositories, programming languages used, and total stars earned. Additionally, it creates a visual plot of the most used programming languages.
This tool is useful for developers, recruiters, or anyone interested in gaining insights into a GitHub user's activity and contributions.
-User Information: Retrieves basic profile details like name, bio, location, followers, following, and public repositories. -Repository Details: Lists all public repositories with descriptions, star counts, and primary languages. -Language Statistics: Aggregates and ranks programming languages by total bytes of code across all repositories. -Total Stars: Calculates the cumulative stars earned from all repositories. -Visual Plot: Generates a horizontal bar chart of the top 10 most used languages using Matplotlib and Seaborn. -Markdown Report: Outputs a comprehensive report in Markdown format for easy reading and sharing. -Pagination Handling: Fetches all repositories, even if there are more than 100, by handling API pagination. -Error Handling: Manages common API errors like user not found, rate limits, and failed requests.
-Python 3.6 or higher -Required Python packages: 1.requests (for API calls) 2.matplotlib (for plotting) 3.seaborn (for enhanced plotting)
-Clone or Download the Script: Save the provided Python script (e.g., github_analyzer.py) to your local machine.
-Install Dependencies: Use pip to install the required packages: pip install requests matplotlib seaborn
-The GitHub API has rate limits for unauthenticated requests (60 requests per hour).
-Run the Script:
Open a terminal or command prompt. Navigate to the directory containing the script. Execute: python github_analyzer.py
-Input Username:
When prompted, enter a valid GitHub username (e.g., octocat).
-Output:
The script will fetch data, display a plot (if languages are found), and generate a Markdown report file named {username}_report.md in the current directory. The plot will appear in a window (using Matplotlib).
Only analyzes public repositories and data. API rate limits apply (use a token to increase limits to 5000 requests per hour). The plot requires a graphical environment (may not work in headless servers). Language data is based on GitHub's language detection, which may not be 100% accurate.
Feel free to fork the repository, submit issues, or create pull requests for improvements. Suggestions for adding features like commit history analysis or follower insights are welcome.
This project is open-source and available under the MIT License. Feel free to use, modify, and distribute.
Created by [Your Name or Anonymous]. Inspired by the need for quick GitHub profile insights.