MCPcopy Index your code
hub / github.com/python/cpython / distribution

Function distribution

Lib/importlib/metadata/__init__.py:1067–1073  ·  view source on GitHub ↗

Get the ``Distribution`` instance for the named package. :param distribution_name: The name of the distribution package as a string. :return: A ``Distribution`` instance (or subclass thereof).

(distribution_name: str)

Source from the content-addressed store, hash-verified

1065
1066
1067def distribution(distribution_name: str) -> Distribution:
1068 """Get the ``Distribution`` instance for the named package.
1069
1070 :param distribution_name: The name of the distribution package as a string.
1071 :return: A ``Distribution`` instance (or subclass thereof).
1072 """
1073 return Distribution.from_name(distribution_name)
1074
1075
1076def distributions(**kwargs) -> Iterable[Distribution]:

Callers 11

test_missing_metadataMethod · 0.90
test_normalized_nameMethod · 0.90
test_for_top_levelMethod · 0.90
versionFunction · 0.85
filesFunction · 0.85
requiresFunction · 0.85

Calls 1

from_nameMethod · 0.80

Used in the wild real call sites across dependent graphs

searching dependent graphs…