10.5.2. Utilities for API Object Modules

pytan3.api_objects.get_versions(api_type='soap')[source]

Search for API object module files of api_type.

Parameters:api_type (str, optional) –

Type of object module to load, must be one of API_TYPES.

Defaults to: DEFAULT_TYPE.

Raises:exceptions.NoVersionFoundError – If no API module files matching PATTERN are found.
Returns:list of dict
pytan3.api_objects.find_version(api_type='soap', veq='', vmax='', vmin='', vshrink=True)[source]

Find a API module files that match version and type.

Parameters:
  • api_type (str, optional) –

    Type of object module to find, must be one of API_TYPES.

    Defaults to: DEFAULT_TYPE.

  • veq (str, optional) –

    Exact version that API object module file must match.

    Defaults to: “”.

  • vmin (str, optional) –

    Minimum version that API object module file must match.

    Defaults to: “”.

  • vmax (str, optional) –

    Maximum version that API object module file must match.

    Defaults to: “”.

  • vshrink (bool, optional) –

    If True, shrink API object module file version down to match the same length as veq, vmax, and vmin.

    If False, do not shrink API object module file version at all.

    If int, shrink API object module file version, veq, vmax, and vmin down to this length.

    Defaults to: True.

Raises:

exceptions.NoVersionFoundError – If no API module files match api_type, veq, vmax, and vmin.

Returns:

dict