Skip to main content

Module name

Module name 

Source
Expand description

Canonical PyPI package name normalization (PEP 503).

This is the single normalization used across deps-pypi — registry lookups, PypiFormatter’s normalize_package_name override, and lock file parsing — so a name declared any of several ways (Zope.Interface, zope_interface, zope-interface) resolves to the same lookup key everywhere. See crate::types::PypiDependency::name for why the declared name is not itself always normalized.

Functions§

normalize
Normalizes name per PEP 503: lowercases, then collapses any run of -, _, or . into a single -.