Blue Brain BioExplorer
check_version.py
Go to the documentation of this file.
1 #!/usr/bin/env python3
2 import configparser
3 import json
4 import urllib.request
5 
6 config = configparser.ConfigParser()
7 config.read("setup.cfg")
8 to_check = config["metadata"]["version"]
9 url = "https://pypi.python.org/pypi/brayns/json"
10 with urllib.request.urlopen(url) as response:
11  data = json.loads(response.read().decode("utf-8"))
12  versions = data["releases"].keys()
13  if to_check not in versions:
14  print(to_check)