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

Function get_package_data

src/scancode/api.py:311–336  ·  view source on GitHub ↗

Return a mapping of package manifest information detected in the file at `location`. Include ``application`` packages (such as pypi) and/or ``system`` packages.

(
    location,
    application=True,
    system=False,
    compiled=False,
    package_only=False,
    **kwargs
)

Source from the content-addressed store, hash-verified

309
310
311def get_package_data(
312 location,
313 application=True,
314 system=False,
315 compiled=False,
316 package_only=False,
317 **kwargs
318):
319 """
320 Return a mapping of package manifest information detected in the file at
321 `location`.
322 Include ``application`` packages (such as pypi) and/or ``system`` packages.
323 """
324 if TRACE:
325 print(' scancode.api.get_package_data: kwargs', kwargs)
326
327 package_datas = _get_package_data(
328 location=location,
329 application=application,
330 system=system,
331 compiled=compiled,
332 package_only=package_only,
333 **kwargs,
334 ) or []
335
336 return dict(package_data=[pd.to_dict() for pd in package_datas])
337
338
339def get_file_info(location, **kwargs):

Callers

nothing calls this directly

Calls 2

_get_package_dataFunction · 0.85
to_dictMethod · 0.45

Tested by

no test coverage detected