mirror of
https://github.com/mvt-project/mvt.git
synced 2024-06-28 15:18:55 +00:00
21 lines
545 B
Python
21 lines
545 B
Python
# Mobile Verification Toolkit (MVT)
|
|
# Copyright (c) 2021 The MVT Project Authors.
|
|
# Use of this software is governed by the MVT License 1.1 that can be found at
|
|
# https://license.mvt.re/1.1/
|
|
|
|
import requests
|
|
from packaging import version
|
|
|
|
MVT_VERSION = "1.4.3"
|
|
|
|
|
|
def check_for_updates():
|
|
res = requests.get("https://pypi.org/pypi/mvt/json")
|
|
data = res.json()
|
|
latest_version = data.get("info", {}).get("version", "")
|
|
|
|
if version.parse(latest_version) > version.parse(MVT_VERSION):
|
|
return latest_version
|
|
|
|
return None
|