Created
February 4, 2022 11:54
-
-
Save Jasperhino/c4aaa1fb8a9927649144bd8d080f6b1a to your computer and use it in GitHub Desktop.
Collect Publix keys of usernames via Github API in Python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from pprint import pprint | |
| import requests | |
| API_URL = 'https://api.github.com/users' | |
| USERS = ['username1', 'username2'] | |
| for user in USERS: | |
| print(user) | |
| r = requests.get(f"{API_URL}/{user}/keys") | |
| json = r.json() | |
| print('Number of keys:', len(json)) | |
| pprint(json) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment