From 45af86b88bf1c6ee8278018902576e91f3f8cced Mon Sep 17 00:00:00 2001 From: BhavyaBojanapalli <50828778+BhavyaBojanapalli@users.noreply.github.com> Date: Tue, 29 Jun 2021 23:52:58 +0530 Subject: [PATCH] Create UserData.py --- Gitlab/UserData.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Gitlab/UserData.py diff --git a/Gitlab/UserData.py b/Gitlab/UserData.py new file mode 100644 index 00000000..c39ac5f2 --- /dev/null +++ b/Gitlab/UserData.py @@ -0,0 +1,16 @@ +############################################################################################################## +# Author: Bhavya Bojanapalli +# This is a simple program which returns the user information by taking input as username of github +################################################################################################################# + +import requests +from pprint import pprint + +# github username +username = "BhavyaBojanapalli" +# url to request +url = "https://api.github.com/users/"+username +# make the request and return the json +user_data = requests.get(url) +print(dir(user_data)) +pprint(user_data.json())