On this page
Registry version query functions for npm, PyPI, Go proxy, and crates.io.
#rlsbl.registry
#rlsbl.registry
Registry version query functions for npm, PyPI, Go proxy, and crates.io.
#query_npm_version
def query_npm_version(name)Query the npm registry for the latest version of a package.
Returns {"status": "found", "version": "X.Y.Z"} on success, {"status": "not_found"} if the package does not exist, or {"status": "error", "message": "..."} on failure.
#query_pypi_version
def query_pypi_version(name)Query PyPI for the latest version of a package.
Returns {"status": "found", "version": "X.Y.Z"} on success, {"status": "not_found"} if the package does not exist, or {"status": "error", "message": "..."} on failure.
#query_go_version
def query_go_version(module_path)Query the Go module proxy for the latest version of a module.
Returns {"status": "found", "version": "X.Y.Z"} on success (v prefix stripped), {"status": "not_found"} if the module does not exist, or {"status": "error", "message": "..."} on failure.
#query_crates_version
def query_crates_version(name)Query crates.io for the latest version of a crate.
Returns {"status": "found", "version": "X.Y.Z"} on success, {"status": "not_found"} if the crate does not exist, or {"status": "error", "message": "..."} on failure.
#query_registry_version
def query_registry_version(name, registry)Query a registry for the latest version of a package.
Dispatches to the appropriate registry-specific function based on the registry parameter ("npm", "pypi", "go", or "cargo").
Returns {"status": "found", "version": "X.Y.Z"} on success, {"status": "not_found"} if the package does not exist, {"status": "error", "message": "..."} on failure, or {"status": "error", "message": "Unknown registry: ..."} for unrecognized registry names.