FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Python/web_programming/fetch_github_info.py at master · cschuerc/Python · GitHub
cschuerc
Python
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
Python
/
web_programming
/
fetch_github_info.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
17 lines (10 loc) · 436 Bytes
Breadcrumbs
Python
/
web_programming
/
fetch_github_info.py
Copy path
File metadata and controls
17 lines (10 loc) · 436 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Created by sarathkaul on 14/11/19
import
requests
_GITHUB_API
=
"https://api.github.com/user"
def
fetch_github_info
(
auth_user
:
str
,
auth_pass
:
str
)
->
None
:
# fetching github info using requests
info
=
requests
.
get
(
_GITHUB_API
,
auth
=
(
auth_user
,
auth_pass
))
for
a_info
,
a_detail
in
info
.
json
().
items
():
print
(
f"
{
a_info
}
:
{
a_detail
}
"
)
if
__name__
==
"main"
:
fetch_github_info
(
"<USER NAME>"
,
"<PASSWORD>"
)
Back
|
FazBrowse Home
|
New Git URL