stdnum.iso6346

ISO 6346 (International standard for container identification)

ISO 6346 is an international standard covering the coding, identification and marking of intermodal (shipping) containers used within containerized intermodal freight transport. The standard establishes a visual identification system for every container that includes a unique serial number (with check digit), the owner, a country code, a size, type and equipment category as well as any operational marks. The standard is managed by the International Container Bureau (BIC).

>>> validate('csqu3054383')
'CSQU3054383'
>>> validate('CSQU3054384')
Traceback (most recent call last):
    ...
InvalidChecksum: ...
Traceback (most recent call last):
    ...
InvalidChecksum: ...
stdnum.iso6346.calc_check_digit(number)

Calculate check digit and return it for the 10 digit owner code and serial number.

stdnum.iso6346.compact(number)

Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.

stdnum.iso6346.is_valid(number)

Check whether the number conforms to the standard ISO6346. Unlike the validate function, this will not raise ValidationError(s).

stdnum.iso6346.validate(number)

Validate the given number (unicode) for conformity to ISO 6346.

Previous topic

stdnum.ismn

Next topic

stdnum.iso9362