🚀 Project Showcase: Fetching Starred GitHub Repositories using Python 🖥️
I developed a Python script to fetch and display a user’s starred repositories from GitHub using their REST API.
Key Features:
- API Integration: Utilizes GitHub’s REST API to retrieve data about repositories starred by a user.
- Secure Authentication: Employs a Personal Access Token (PAT) for secure API requests, avoiding the use of passwords.
- Data Retrieval: Sends a GET request to the
/users/{username}/starredendpoint to obtain repository details such as:- Name: The repository’s name.
- Description: A brief description of the repository.
- Stars: The number of stars the repository has received.
- Error Handling: Includes basic error handling to manage issues like authentication failures or API rate limits.
How It Works:
- Dependencies: Uses the
requestslibrary for making HTTP requests and handling authentication. - Fetching Data: The
fetch_starred_repositoriesfunction makes an authenticated request to GitHub’s API and retrieves the starred repositories in JSON format. - Displaying Information: The
display_repositoriesfunction formats and prints the repository details in a readable manner.
This project demonstrates my ability to integrate with web APIs, implement secure authentication, and handle data effectively using Python. 📊🔒
