Created
June 5, 2018 18:04
-
-
Save vsoch/a345c92ffa412cd1987852c8ec69983e to your computer and use it in GitHub Desktop.
Get image metadata from Singularity Hub (you get the gist!)
This file contains 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
import requests | |
response = requests.get('http://singularity-hub.org/api/container/vsoch/singularity-images/') | |
if respnse.status_code == 200: | |
response.json() | |
# {'branch': 'master', | |
# 'commit': '130504089d5b2b44e2788992d0de75b625da6796', | |
# 'id': 2688, | |
# 'image': 'https://www.googleapis.com/download/storage/v1/b/singularityhub/o/singularityhub%2Fgithub.com%2Fvsoch%2Fsingularity-images%2F130504089d5b2b44e2788992d0de75b625da6796%2Fa1025471b564766d08bdf2cb062c795c%2Fa1025471b564766d08bdf2cb062c795c.simg?generation=1525030158750776&alt=media', | |
# 'name': 'vsoch/singularity-images', | |
# 'size_mb': '95', | |
' # tag': 'latest', | |
# 'version': 'a1025471b564766d08bdf2cb062c795c'} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment