npm¶
Attributes¶
Classes¶
Module Contents¶
- npm.logger¶
- class npm.NPMLink(name: str, version: str, url: str, checksum: str)¶
- filename¶
- package_name¶
- version¶
- url¶
- checksum¶
- class npm.NPMLinksParser¶
-
- _raise_missing_key(key: str) None¶
- feed(data: str) NPMLinksParser¶
Feed this parser with retrieved JSON data.
- class npm.NPM(url: str = 'https://registry.npmjs.org/')¶
- url = 'https://registry.npmjs.org/'¶
- fetch_project_links(name: str, *, headers: dict[str, str | bytes | None] | None = None) list[NPMLink]¶
Fetch list of resources for a given NPM package.
- Parameters:
name – NPM package name
headers – To add additionnal headers to the HTTP request. Can be mandatory depending on the situation.
- Returns:
a list of dict containing the link to each resource along with some metadata