Utilities

A set of small, helper utilities for dealing with Python packages.

Reference

packaging.utils.canonicalize_name(name)

This function takes a valid Python package name, and returns the normalized form of it.

Parameters:name (str) – The name to normalize.
>>> from packaging.utils import canonicalize_name
>>> canonicalize_name("Django")
'django'
>>> canonicalize_name("oslo.concurrency")
'oslo-concurrency'
>>> canonicalize_name("requests")
'requests'