MCPcopy Create free account
hub / github.com/modelscope/FunASR / get_pypi_version

Function get_pypi_version

funasr/utils/version_checker.py:5–19  ·  view source on GitHub ↗

Get pypi version. Args: package_name: TODO.

(package_name)

Source from the content-addressed store, hash-verified

3
4
5def get_pypi_version(package_name):
6 """Get pypi version.
7
8 Args:
9 package_name: TODO.
10 """
11 import requests
12
13 url = f"https://pypi.org/pypi/{package_name}/json"
14 response = requests.get(url)
15 if response.status_code == 200:
16 data = response.json()
17 return version.parse(data["info"]["version"])
18 else:
19 raise Exception("Failed to retrieve version information from PyPI.")
20
21
22def check_for_update(disable=False):

Callers 1

check_for_updateFunction · 0.85

Calls 1

parseMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…