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

Function metadata

Lib/importlib/metadata/__init__.py:1084–1091  ·  view source on GitHub ↗

Get the metadata for the named package. :param distribution_name: The name of the distribution package to query. :return: A PackageMetadata containing the parsed metadata. :raises MetadataNotFound: If no metadata file is present in the distribution.

(distribution_name: str)

Source from the content-addressed store, hash-verified

1082
1083
1084def metadata(distribution_name: str) -> _meta.PackageMetadata:
1085 """Get the metadata for the named package.
1086
1087 :param distribution_name: The name of the distribution package to query.
1088 :return: A PackageMetadata containing the parsed metadata.
1089 :raises MetadataNotFound: If no metadata file is present in the distribution.
1090 """
1091 return Distribution.from_name(distribution_name).metadata
1092
1093
1094def version(distribution_name: str) -> str:

Callers 10

test_missing_metadataMethod · 0.90
test_metadata_loadsMethod · 0.90
test_missing_keyMethod · 0.90
test_get_keyMethod · 0.90
test_get_missing_keyMethod · 0.90
test_as_jsonMethod · 0.90
test_as_json_egg_infoMethod · 0.90
test_as_json_odd_caseMethod · 0.90

Calls 1

from_nameMethod · 0.80

Tested by 10

test_missing_metadataMethod · 0.72
test_metadata_loadsMethod · 0.72
test_missing_keyMethod · 0.72
test_get_keyMethod · 0.72
test_get_missing_keyMethod · 0.72
test_as_jsonMethod · 0.72
test_as_json_egg_infoMethod · 0.72
test_as_json_odd_caseMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…