Skip to content

Latest commit

ย 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

GitHub Developer Analyzer

A Python-based GitHub API automation tool that collects, stores, analyzes, and automatically synchronizes GitHub developer data.

This project uses the GitHub REST API to retrieve developer profiles and repository information, stores the data locally in JSON, and automatically updates saved users whenever the program starts.

๐Ÿš€ Features

  • GitHub REST API integration
  • Add and save GitHub users
  • Persistent JSON database
  • Automatic database synchronization on startup
  • Search and view individual users
  • Analyze all saved users
  • Repository statistics
  • Follower and following statistics
  • Repository star statistics
  • Delete saved users
  • Automatic updating of stored GitHub data
  • Clean terminal-based user interface
  • Multi-user database support

๐Ÿง  How It Works

The system connects Python to the GitHub REST API.

When a GitHub username is added, the program retrieves:

  • Username
  • Name
  • Followers
  • Following
  • Public repositories
  • Repository names
  • Repository programming languages
  • Repository stars
  • GitHub profile URL

The collected information is stored locally in:

github_reports.json

The JSON file acts as the project's local database.

GitHub
   โ†“
GitHub REST API
   โ†“
Python
   โ†“
Data Processing
   โ†“
JSON Database
   โ†“
Analysis / Terminal Interface

๐Ÿ”„ Automatic Synchronization

Every time the program starts, it automatically checks the saved GitHub users and updates their stored information with the latest available data.

Program Starts
      โ†“
Load JSON Database
      โ†“
Read Saved Users
      โ†“
GitHub API
      โ†“
Fetch Latest Data
      โ†“
Update JSON Database
      โ†“
Open Dashboard

No manual refresh button is required.

For example, if a saved user:

  • gains followers
  • follows another account
  • creates a new repository
  • receives new repository stars
  • changes repository information

the latest information is automatically saved when the program starts.

The synchronization is intentionally quiet, so the terminal does not print a separate line for every saved user.

Example:

Synchronizing GitHub database... Complete.

๐Ÿ“Š Data Stored

Each saved user contains information similar to:

{
    "username": "example-user",
    "name": "Example User",
    "followers": 10,
    "following": 5,
    "public_repos": 8,
    "profile_url": "https://github.com/example-user",
    "repository_count": 8,
    "repositories": [
        {
            "name": "example-project",
            "language": "Python",
            "stars": 3
        }
    ]
}

The exact stored structure depends on the current implementation of the Python program.

๐ŸŽ›๏ธ Controller Menu

The main controller provides options for managing the GitHub database.

=======================================================
          GITHUB DEVELOPER ANALYZER
=======================================================

1. Add GitHub User
2. View Saved Users
3. Search / View User
4. Analyze All Users
5. Delete User
6. Exit

โž• Add GitHub User

Select:

1. Add GitHub User

Then enter a GitHub username.

The program:

  1. Connects to the GitHub API.
  2. Retrieves the user's profile.
  3. Retrieves their public repositories.
  4. Collects repository information.
  5. Creates the user's report.
  6. Saves the report to the JSON database.

If the username already exists, the program prevents unnecessary duplicate entries.

๐Ÿ‘ฅ View Saved Users

Select:

2. View Saved Users

to see all GitHub users currently stored in the local database.

The saved users can then be selected or searched for further analysis.

๐Ÿ”Ž Search / View User

Select:

3. Search / View User

to view the stored information of one specific GitHub user.

The analysis can include:

  • Username
  • Name
  • Followers
  • Following
  • Public repositories
  • Repository count
  • Total repository stars
  • GitHub profile
  • Repository names
  • Repository languages
  • Repository star counts

Example:

=======================================================
              GITHUB USER ANALYSIS
=======================================================

Username       : Muhammad-Ahsan14
Name           : MUHAMMAD AHSAN
Followers      : 1
Following      : 2
Public Repos   : 6
Total Stars    : 0
Profile        : https://github.com/Muhammad-Ahsan14

๐Ÿ“ˆ Analyze All Users

Select:

4. Analyze All Users

to generate an overall summary of the saved database.

The system can analyze:

  • Total saved users
  • Total repositories
  • Total stars
  • Repository counts
  • Developer activity
  • Individual user statistics

This turns the stored JSON data into a small developer analytics system rather than simply a collection of profiles.

๐Ÿ—‘๏ธ Delete User

Select:

5. Delete User

to remove a saved user from the local JSON database.

The program asks for confirmation before deletion.

Are you sure you want to delete this saved report? (y/n):

Deleting a saved report only removes the local copy.

It does not delete the user's GitHub account, repositories, or information from GitHub.

๐Ÿ’ป Software Requirements

  • Python 3
  • Internet connection
  • GitHub API access
  • VS Code or another Python editor
  • Git

๐Ÿ“ฆ Python Dependencies

The project uses the requests library for communication with the GitHub API.

Install it with:

pip install requests

๐Ÿ“ Project Structure

GITHUB DEVELOPER ANALYZER
โ”‚
โ”œโ”€โ”€ main.py
โ”œโ”€โ”€ github_reports.json
โ””โ”€โ”€ README.md

main.py

Contains the Python application logic, API communication, database handling, synchronization, analysis, and terminal interface.

github_reports.json

Stores the saved GitHub user reports and repository information.

README.md

Contains the project documentation and setup instructions.

โ–ถ๏ธ How to Run

1. Clone the Repository

Clone the repository from GitHub:

git clone YOUR_REPOSITORY_URL

Enter the project directory:

cd github-developer-analyzer

2. Check Python

Make sure Python 3 is installed:

python --version

3. Install Dependencies

Run:

pip install requests

4. Run the Program

Run:

python main.py

5. Add a GitHub User

Select:

1. Add GitHub User

Enter a public GitHub username.

The program retrieves the user's information and saves it to the JSON database.

6. Use the Dashboard

After adding users:

2 โ†’ View Saved Users
3 โ†’ Search / View User
4 โ†’ Analyze All Users
5 โ†’ Delete User
6 โ†’ Exit

7. Restart the Program

When the program starts again, the saved users are automatically synchronized with GitHub.

Synchronizing GitHub database... Complete.

The database therefore stays updated without requiring a separate refresh option.

๐Ÿงช Reproduction Checklist

  • Python 3 is installed
  • Internet connection is available
  • requests is installed
  • main.py is present
  • GitHub usernames are entered correctly
  • GitHub API connection is working
  • JSON database can be created
  • A GitHub user can be added
  • Saved users can be viewed
  • Individual user analysis works
  • Overall analysis works
  • Users can be deleted
  • Automatic synchronization works after restarting the program

๐Ÿ› Troubleshooting

Python Does Not Start

Check that Python is installed:

python --version

If Python is not recognized, install Python 3 and make sure it is added to the system PATH.

requests Is Missing

Install it with:

pip install requests

API Connection Failed

Check:

  • Internet connection
  • GitHub availability
  • Username spelling
  • Python environment
  • API response or error message

User Is Not Found

Make sure the GitHub username is entered exactly as it appears on GitHub.

For example:

Muhammad-Ahsan14

is different from:

Muhammad Ahsan

Saved Data Looks Outdated

Restart the program.

The startup synchronization will retrieve the latest available GitHub information and update the local database.

API Rate Limit

GitHub applies API rate limits.

For a larger database containing many users, authenticated GitHub API access should be considered.

๐Ÿ” Data and API Notes

This project works with publicly available GitHub information.

The local JSON database stores the information collected by the application.

For a larger production system, the project could later use:

  • GitHub authentication
  • Environment variables
  • API rate-limit monitoring
  • SQLite
  • PostgreSQL
  • Scheduled background synchronization

Sensitive credentials should never be hard-coded into the source code.

๐Ÿงฉ System Architecture

                    GITHUB
                       โ”‚
                       โ”‚ REST API
                       โ†“
                    Python
                       โ”‚
              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
              โ†“                 โ†“
       Data Collection       Analysis
              โ”‚                 โ”‚
              โ†“                 โ†“
        JSON Database      Terminal UI
              โ”‚
              โ†“
     Automatic Synchronization

๐Ÿ”„ Automation Flow

Saved GitHub User
        โ†“
Fetch Latest Data
        โ†“
Process API Response
        โ†“
Update Stored Report
        โ†“
Save JSON Database

The local database therefore acts as an automatically updated snapshot of the saved GitHub users.

๐Ÿง  What I Learned

Through this project I learned:

  • Python API integration
  • REST APIs
  • HTTP requests
  • JSON data handling
  • JSON file storage
  • Persistent local data
  • GitHub API usage
  • API response handling
  • Error handling
  • Data processing
  • Data analysis
  • Automation logic
  • CRUD-style application design
  • Working with external services
  • Building terminal interfaces
  • Synchronizing external data
  • Designing software around real-world APIs

๐Ÿ–ฅ๏ธ UI Evolution

The current version uses a terminal-based interface intentionally.

The larger software roadmap will gradually move toward more advanced interfaces:

Terminal UI
     โ†“
Desktop GUI
     โ†“
Web Dashboard
     โ†“
AI-Powered Interface

The API and automation logic developed in this project can later become the backend of a proper graphical or web-based application.

๐Ÿ”ฎ Future Improvements

Possible future upgrades include:

  • GitHub API authentication
  • Better API rate-limit handling
  • Historical user snapshots
  • Follower growth tracking
  • Repository growth tracking
  • Star growth tracking
  • Graphs and visual analytics
  • Web dashboard
  • Desktop GUI
  • Scheduled background synchronization
  • Email notifications
  • Discord or Telegram notifications
  • SQLite database
  • PostgreSQL database
  • Advanced developer activity scoring
  • AI-powered developer analysis
  • Automated developer reports
  • Data visualization
  • Machine learning-based insights

๐Ÿ—๏ธ Project Vision

This project is an early building block toward larger software and AI automation systems.

The goal is to gradually combine:

  • Python
  • APIs
  • Automation
  • Data
  • AI
  • IoT
  • Embedded Systems
  • Hardware
  • Software
  • Intelligent Interfaces

into increasingly capable real-world systems.

This project represents the transition from writing basic Python programs to building software that communicates with real external services, stores information, analyzes data, and performs automated actions.

๐Ÿ‘จโ€๐Ÿ’ป Author

Muhammad Ahsan

Computer Engineering Student
COMSATS University Islamabad, Lahore Campus

๐Ÿ† Operation-1000

This project is part of my Operation-1000 journey.

The goal is to continuously:

Learn
  โ†“
Build
  โ†“
Break
  โ†“
Fix
  โ†“
Document
  โ†“
Publish
  โ†“
Improve

The long-term objective is to turn individual projects into strong technical experience and eventually use these skills to build innovative software, hardware, AI, IoT, and automation products.


โญ More projects coming.

About

A Python GitHub API automation tool that stores, analyzes, and automatically synchronizes GitHub developer data using JSON

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages