@@ -0,0 +1,557 @@
+import logging%0Aimport requests%0A%0A%0Adef get_world_topology():%0A    ans = requests.get(%22https://restcountries.eu/rest/v2/all?fields=name;capital;region;subregion;latlng;alpha3Code;borders%22)%0A    if ans.status_code != 200:%0A        raise RuntimeError(%22Unable to get country data%22)%0A    countries = %7Bcountry.pop(%22alpha3Code%22): country for country in ans.json()%7D%0A    logging.info(%22Done getting raw topological data%22)%0A    for country in countries:%0A        countries%5Bcountry%5D%5B%22borders%22%5D = %5Bcountries%5Bname%5D for name in countries%5Bcountry%5D%5B%22borders%22%5D%5D%0A    return countries%0A

Read country topology from restcountries.eu