'Extract data from from git hub usi git api in python

I want to extract a user's public profile details along with the name of the repositories they are contributing to and finally the number of commits made by that developer on those repositories using a python scrip and I want to log it.



Solution 1:[1]

to extract user data:

user_url = f"https://api.github.com/users/{user}"
user_response = requests.get(user_url)
user_response_dict = user_events_response.json()

repositories:

user_repo_url = f"https://api.github.com/users/{user}/repos"
user_repo_response = requests.get(user_repo_url)
response_dict = user_repo_response.json()

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Tal Folkman