CPE2_3 class¶
- class cpe.cpe2_3.CPE2_3(cpe_str, *args, **kwargs)[source]¶
Represents a generic CPE name compatible with all CPE name style of version 2.3 of CPE specification.
- STYLE = 'undefined'¶
Style of CPE name
- STYLE_FS = 'FS'¶
Formatted string style of version 2.3 of CPE specification
- STYLE_UNDEFINED = 'undefined'¶
Style of version 2.3 of CPE specification not set
- STYLE_URI = 'URI'¶
Uniform Resource Identifier(URI) style of version 2.3 of CPE specification
- STYLE_WFN = 'WFN'¶
Well-Formed Name (WFN) style of version 2.3 of CPE specification
- VERSION = '2.3'¶
Version of CPE name
- static __new__(cpe_str, *args, **kwargs)[source]¶
Generator of CPE Names according to version 2.3.
Parameters: cpe_str (string) – CPE Name string Returns: CPE object of version 2.3 with style detected correctly Return type: CPE2_3 Exception: NotImplementedError - incorrect CPE Name or version of CPE not implemented This class implements the factory pattern, that is, this class centralizes the creation of objects of a particular CPE style of version 2.3, hiding the user the requested object instance.