MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-toolkit / from_dict

Method from_dict

src/packagedcode/models.py:1681–1690  ·  view source on GitHub ↗

Return an instance of Package built from a ``mapping`` of native Python data, typically a PackageData-like ``mapping``. Return None if there are not enough data to form a PackageURL from this data. See PackageData.from_dict() for other details.

(cls, mapping)

Source from the content-addressed store, hash-verified

1679
1680 @classmethod
1681 def from_dict(cls, mapping):
1682 """
1683 Return an instance of Package built from a ``mapping`` of native Python
1684 data, typically a PackageData-like ``mapping``. Return None if there are
1685 not enough data to form a PackageURL from this data.
1686
1687 See PackageData.from_dict() for other details.
1688 """
1689 if build_purl(mapping):
1690 return super().from_dict(mapping)
1691
1692 def is_compatible(self, package_data, include_qualifiers=True):
1693 """

Callers 15

assembleMethod · 0.45
from_dictMethod · 0.45
_rehydrate_listFunction · 0.45
to_package_dataMethod · 0.45
from_package_dataMethod · 0.45
updateMethod · 0.45
assembleMethod · 0.45

Calls 1

build_purlFunction · 0.85

Tested by

no test coverage detected