Skip to main content

package_url

Function package_url 

Source
pub fn package_url(name: &str) -> String
Expand description

Returns the URL for a package’s page on pypi.org.

Package names are normalized and URL-encoded to prevent path traversal attacks. Returns an empty string if name normalizes to nothing (e.g. "---"), rather than a dead link with an empty path segment — matching the PackageNotFound short-circuit get_versions/get_package_metadata apply for the same case.