MCPcopy Create free account
hub / github.com/OpenHands/OpenHands / fetchPyPIVersion

Function fetchPyPIVersion

scripts/check-sdk-version-sync.mjs:219–231  ·  view source on GitHub ↗

* Fetch the latest version of a package from PyPI

(packageName)

Source from the content-addressed store, hash-verified

217 * Fetch the latest version of a package from PyPI
218 */
219async function fetchPyPIVersion(packageName) {
220 const url = `https://pypi.org/pypi/${packageName}/json`;
221 try {
222 const response = await fetch(url);
223 if (!response.ok) {
224 return null;
225 }
226 const data = await response.json();
227 return data.info?.version || null;
228 } catch {
229 return null;
230 }
231}
232
233/**
234 * Read the automation version from env var or config/defaults.json

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected