pystra.decision.swtp.get_swtp_record#

get_swtp_record(code, indexed=None, index_table=None)[source]#

Return a country-level SWTP record.

Parameters:
  • code (str) – Country code or supported country-name alias.

  • indexed (bool | None) – Must be supplied explicitly. False returns the 1999 Rackwitz anchor; True returns the value indexed with the built-in World Bank GDP per capita PPP factors. There is no default so the anchor is never returned silently.

  • index_table (Mapping[str, SWTPIndexRecord] | None) – Alternate country-code mapping of SWTPIndexRecord objects.

Returns:

Source-backed SWTP value.

Return type:

SWTPRecord