CPEComponent2_3_URI class

class cpe.comp.cpecomp2_3_uri.CPEComponent2_3_URI(comp_str, comp_att)[source]

Represents a component of version 2.3 of CPE specification with URI style.

SEPARATOR_COMP = ':'

Separator of components of CPE name with URI style

SEPARATOR_LANG = '-'

Separator of language parts: language and region

SEPARATOR_PACKED_EDITION = '~'

Separator of edition part components in CPE uri

VALUE_ANY = ''

Logical value associated with a any value logical value

VALUE_EMPTY = ''

Logical value associated with a component without value

VALUE_NA = '-'

Logical value associated with a not applicable logical value

VALUE_UNDEFINED = None

Logical value associated with a undefined component

WILDCARD_MULTI = '%02'

Constant associated with wildcard to indicate a sequence of characters

WILDCARD_ONE = '%01'

Constant associated with wildcard to indicate a character

char_to_pce = {'!': '%21', '#': '%23', '"': '%22', '%': '%25', '$': '%24', "'": '%27', '&': '%26', ')': '%29', '(': '%28', '+': '%2b', '*': '%2a', ',': '%2c', '/': '%2f', ';': '%3b', ':': '%3a', '=': '%3d', '<': '%3c', '?': '%3f', '>': '%3e', '@': '%40', '[': '%5b', ']': '%5d', '\\': '%5c', '^': '%5e', '`': '%60', '{': '%7b', '}': '%7d', '|': '%7c', '~': '%7e'}

Characters to convert to percent-encoded characters

pce_char_to_decode = {'%7e': '\\~', '%7d': '\\}', '%24': '\\$', '%25': '\\%', '%26': '\\&', '%27': "\\'", '%21': '\\!', '%22': '\\"', '%23': '\\#', '%5e': '\\^', '%5d': '\\]', '%28': '\\(', '%29': '\\)', '%5c': '\\\\', '%5b': '\\[', '%3f': '\\?', '%3e': '\\>', '%3d': '\\=', '%3c': '\\<', '%3b': '\\;', '%3a': '\\:', '%60': '\\`', '%7b': '\\{', '%40': '\\@', '%7c': '\\|', '%2f': '\\/', '%2a': '\\*', '%2b': '\\+', '%2c': '\\,'}

Percent-encoded characters to decode