rlsbl v0.92.0 /rlsbl.registry
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

python
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

python
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

python
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

python
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

python
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.