stdnum.meid

MEID (Mobile Equipment Identifier).

The Mobile Equipment Identifier is used to identify a physical piece of CDMA mobile station equipment.

>>> compact('AF 01 23 45 0A BC DE C')
'AF0123450ABCDE'
>>> is_valid('AF 01 23 45 0A BC DE')
True
>>> is_valid('AF 01 23 45 0A BC DE C')
True
>>> is_valid('29360 87365 0070 3710 0')
True
>>> format('af0123450abcDEC', add_check_digit=True)
'AF 01 23 45 0A BC DE C'
stdnum.meid.compact(number, strip_check_digit=True)

Convert the MEID number to the minimal (hexadecimal) representation. This strips grouping information, removes surrounding whitespace and converts to hexadecimal if needed. If the check digit is to be preserved and conversion is done a new check digit is recalculated.

stdnum.meid.format(number, separator=' ', format=None, add_check_digit=False)

Reformat the passed number to the standard format. The separator used can be provided. If the format is specified (either ‘hex’ or ‘dec’) the number is reformatted in that format, otherwise the current representation is kept. If add_check_digit is True a check digit will be added if it is not present yet.

stdnum.meid.is_valid(number)

Checks to see if the number provided is a valid MEID number.

stdnum.meid.to_pseudo_esn(number)

Convert the provided MEID to a pseudo ESN (pESN). The ESN is returned in compact HEX representation.

Previous topic

stdnum.lv.pvn

Next topic

stdnum.mt.vat