10.8.5. Utilities for SOAP API Results

pytan3.results.try_int_xml(path, key, value)[source]

Parser hook for xmltodict.parse to try to convert str to int.

Parameters:
  • path (list) – Path from root of document to key.
  • key (str) – Element name being parsed.
  • value (object) – Element value of key being parsed.
Returns:

original key supplied and value as int if successfully converted.

Return type:

(str, object)