266 lines
11 KiB
Python
266 lines
11 KiB
Python
_dataset = [
|
|
("AW", "ABW", "Aruba"),
|
|
("AF", "AFG", "Islamic Republic of Afghanistan"),
|
|
("AO", "AGO", "Republic of Angola"),
|
|
("AI", "AIA", "Anguilla"),
|
|
("AX", "ALA", "Åland Islands"),
|
|
("AL", "ALB", "Republic of Albania"),
|
|
("AD", "AND", "Principality of Andorra"),
|
|
("AE", "ARE", "United Arab Emirates"),
|
|
("AR", "ARG", "Argentine Republic"),
|
|
("AM", "ARM", "Republic of Armenia"),
|
|
("AS", "ASM", "American Samoa"),
|
|
("AQ", "ATA", "Antarctica"),
|
|
("TF", "ATF", "French Southern Territories"),
|
|
("AG", "ATG", "Antigua and Barbuda"),
|
|
("AU", "AUS", "Australia"),
|
|
("AT", "AUT", "Republic of Austria"),
|
|
("AZ", "AZE", "Republic of Azerbaijan"),
|
|
("BI", "BDI", "Republic of Burundi"),
|
|
("BE", "BEL", "Kingdom of Belgium"),
|
|
("BJ", "BEN", "Republic of Benin"),
|
|
("BQ", "BES", "Bonaire, Sint Eustatius and Saba"),
|
|
("BF", "BFA", "Burkina Faso"),
|
|
("BD", "BGD", "People's Republic of Bangladesh"),
|
|
("BG", "BGR", "Republic of Bulgaria"),
|
|
("BH", "BHR", "Kingdom of Bahrain"),
|
|
("BS", "BHS", "Commonwealth of the Bahamas"),
|
|
("BA", "BIH", "Republic of Bosnia and Herzegovina"),
|
|
("BL", "BLM", "Saint Barthélemy"),
|
|
("BY", "BLR", "Republic of Belarus"),
|
|
("BZ", "BLZ", "Belize"),
|
|
("BM", "BMU", "Bermuda"),
|
|
("BO", "BOL", "Plurinational State of Bolivia"),
|
|
("BR", "BRA", "Federative Republic of Brazil"),
|
|
("BB", "BRB", "Barbados"),
|
|
("BN", "BRN", "Brunei Darussalam"),
|
|
("BT", "BTN", "Kingdom of Bhutan"),
|
|
("BV", "BVT", "Bouvet Island"),
|
|
("BW", "BWA", "Republic of Botswana"),
|
|
("CF", "CAF", "Central African Republic"),
|
|
("CA", "CAN", "Canada"),
|
|
("CC", "CCK", "Cocos (Keeling) Islands"),
|
|
("CH", "CHE", "Swiss Confederation"),
|
|
("CL", "CHL", "Republic of Chile"),
|
|
("CN", "CHN", "People's Republic of China"),
|
|
("CI", "CIV", "Republic of Côte d'Ivoire"),
|
|
("CM", "CMR", "Republic of Cameroon"),
|
|
("CD", "COD", "Congo, The Democratic Republic of the"),
|
|
("CG", "COG", "Republic of the Congo"),
|
|
("CK", "COK", "Cook Islands"),
|
|
("CO", "COL", "Republic of Colombia"),
|
|
("KM", "COM", "Union of the Comoros"),
|
|
("CV", "CPV", "Republic of Cabo Verde"),
|
|
("CR", "CRI", "Republic of Costa Rica"),
|
|
("CU", "CUB", "Republic of Cuba"),
|
|
("CW", "CUW", "Curaçao"),
|
|
("CX", "CXR", "Christmas Island"),
|
|
("KY", "CYM", "Cayman Islands"),
|
|
("CY", "CYP", "Republic of Cyprus"),
|
|
("CZ", "CZE", "Czech Republic"),
|
|
("DE", "DEU", "Federal Republic of Germany"),
|
|
("DJ", "DJI", "Republic of Djibouti"),
|
|
("DM", "DMA", "Commonwealth of Dominica"),
|
|
("DK", "DNK", "Kingdom of Denmark"),
|
|
("DO", "DOM", "Dominican Republic"),
|
|
("DZ", "DZA", "People's Democratic Republic of Algeria"),
|
|
("EC", "ECU", "Republic of Ecuador"),
|
|
("EG", "EGY", "Arab Republic of Egypt"),
|
|
("ER", "ERI", "the State of Eritrea"),
|
|
("EH", "ESH", "Western Sahara"),
|
|
("ES", "ESP", "Kingdom of Spain"),
|
|
("EE", "EST", "Republic of Estonia"),
|
|
("ET", "ETH", "Federal Democratic Republic of Ethiopia"),
|
|
("FI", "FIN", "Republic of Finland"),
|
|
("FJ", "FJI", "Republic of Fiji"),
|
|
("FK", "FLK", "Falkland Islands (Malvinas)"),
|
|
("FR", "FRA", "French Republic"),
|
|
("FO", "FRO", "Faroe Islands"),
|
|
("FM", "FSM", "Federated States of Micronesia"),
|
|
("GA", "GAB", "Gabonese Republic"),
|
|
("GB", "GBR", "United Kingdom of Great Britain and Northern Ireland"),
|
|
("GE", "GEO", "Georgia"),
|
|
("GG", "GGY", "Guernsey"),
|
|
("GH", "GHA", "Republic of Ghana"),
|
|
("GI", "GIB", "Gibraltar"),
|
|
("GN", "GIN", "Republic of Guinea"),
|
|
("GP", "GLP", "Guadeloupe"),
|
|
("GM", "GMB", "Republic of the Gambia"),
|
|
("GW", "GNB", "Republic of Guinea-Bissau"),
|
|
("GQ", "GNQ", "Republic of Equatorial Guinea"),
|
|
("GR", "GRC", "Hellenic Republic"),
|
|
("GD", "GRD", "Grenada"),
|
|
("GL", "GRL", "Greenland"),
|
|
("GT", "GTM", "Republic of Guatemala"),
|
|
("GF", "GUF", "French Guiana"),
|
|
("GU", "GUM", "Guam"),
|
|
("GY", "GUY", "Republic of Guyana"),
|
|
("HK", "HKG", "Hong Kong Special Administrative Region of China"),
|
|
("HM", "HMD", "Heard Island and McDonald Islands"),
|
|
("HN", "HND", "Republic of Honduras"),
|
|
("HR", "HRV", "Republic of Croatia"),
|
|
("HT", "HTI", "Republic of Haiti"),
|
|
("HU", "HUN", "Hungary"),
|
|
("ID", "IDN", "Republic of Indonesia"),
|
|
("IM", "IMN", "Isle of Man"),
|
|
("IN", "IND", "Republic of India"),
|
|
("IO", "IOT", "British Indian Ocean Territory"),
|
|
("IE", "IRL", "Ireland"),
|
|
("IR", "IRN", "Islamic Republic of Iran"),
|
|
("IQ", "IRQ", "Republic of Iraq"),
|
|
("IS", "ISL", "Republic of Iceland"),
|
|
("IL", "ISR", "State of Israel"),
|
|
("IT", "ITA", "Italian Republic"),
|
|
("JM", "JAM", "Jamaica"),
|
|
("JE", "JEY", "Jersey"),
|
|
("JO", "JOR", "Hashemite Kingdom of Jordan"),
|
|
("JP", "JPN", "Japan"),
|
|
("KZ", "KAZ", "Republic of Kazakhstan"),
|
|
("KE", "KEN", "Republic of Kenya"),
|
|
("KG", "KGZ", "Kyrgyz Republic"),
|
|
("KH", "KHM", "Kingdom of Cambodia"),
|
|
("KI", "KIR", "Republic of Kiribati"),
|
|
("KN", "KNA", "Saint Kitts and Nevis"),
|
|
("KR", "KOR", "Korea, Republic of"),
|
|
("KW", "KWT", "State of Kuwait"),
|
|
("LA", "LAO", "Lao People's Democratic Republic"),
|
|
("LB", "LBN", "Lebanese Republic"),
|
|
("LR", "LBR", "Republic of Liberia"),
|
|
("LY", "LBY", "Libya"),
|
|
("LC", "LCA", "Saint Lucia"),
|
|
("LI", "LIE", "Principality of Liechtenstein"),
|
|
("LK", "LKA", "Democratic Socialist Republic of Sri Lanka"),
|
|
("LS", "LSO", "Kingdom of Lesotho"),
|
|
("LT", "LTU", "Republic of Lithuania"),
|
|
("LU", "LUX", "Grand Duchy of Luxembourg"),
|
|
("LV", "LVA", "Republic of Latvia"),
|
|
("MO", "MAC", "Macao Special Administrative Region of China"),
|
|
("MF", "MAF", "Saint Martin (French part)"),
|
|
("MA", "MAR", "Kingdom of Morocco"),
|
|
("MC", "MCO", "Principality of Monaco"),
|
|
("MD", "MDA", "Republic of Moldova"),
|
|
("MG", "MDG", "Republic of Madagascar"),
|
|
("MV", "MDV", "Republic of Maldives"),
|
|
("MX", "MEX", "United Mexican States"),
|
|
("MH", "MHL", "Republic of the Marshall Islands"),
|
|
("MK", "MKD", "Republic of North Macedonia"),
|
|
("ML", "MLI", "Republic of Mali"),
|
|
("MT", "MLT", "Republic of Malta"),
|
|
("MM", "MMR", "Republic of Myanmar"),
|
|
("ME", "MNE", "Montenegro"),
|
|
("MN", "MNG", "Mongolia"),
|
|
("MP", "MNP", "Commonwealth of the Northern Mariana Islands"),
|
|
("MZ", "MOZ", "Republic of Mozambique"),
|
|
("MR", "MRT", "Islamic Republic of Mauritania"),
|
|
("MS", "MSR", "Montserrat"),
|
|
("MQ", "MTQ", "Martinique"),
|
|
("MU", "MUS", "Republic of Mauritius"),
|
|
("MW", "MWI", "Republic of Malawi"),
|
|
("MY", "MYS", "Malaysia"),
|
|
("YT", "MYT", "Mayotte"),
|
|
("NA", "NAM", "Republic of Namibia"),
|
|
("NC", "NCL", "New Caledonia"),
|
|
("NE", "NER", "Republic of the Niger"),
|
|
("NF", "NFK", "Norfolk Island"),
|
|
("NG", "NGA", "Federal Republic of Nigeria"),
|
|
("NI", "NIC", "Republic of Nicaragua"),
|
|
("NU", "NIU", "Niue"),
|
|
("NL", "NLD", "Kingdom of the Netherlands"),
|
|
("NO", "NOR", "Kingdom of Norway"),
|
|
("NP", "NPL", "Federal Democratic Republic of Nepal"),
|
|
("NR", "NRU", "Republic of Nauru"),
|
|
("NZ", "NZL", "New Zealand"),
|
|
("OM", "OMN", "Sultanate of Oman"),
|
|
("PK", "PAK", "Islamic Republic of Pakistan"),
|
|
("PA", "PAN", "Republic of Panama"),
|
|
("PN", "PCN", "Pitcairn"),
|
|
("PE", "PER", "Republic of Peru"),
|
|
("PH", "PHL", "Republic of the Philippines"),
|
|
("PW", "PLW", "Republic of Palau"),
|
|
("PG", "PNG", "Independent State of Papua New Guinea"),
|
|
("PL", "POL", "Republic of Poland"),
|
|
("PR", "PRI", "Puerto Rico"),
|
|
("KP", "PRK", "Democratic People's Republic of Korea"),
|
|
("PT", "PRT", "Portuguese Republic"),
|
|
("PY", "PRY", "Republic of Paraguay"),
|
|
("PS", "PSE", "the State of Palestine"),
|
|
("PF", "PYF", "French Polynesia"),
|
|
("QA", "QAT", "State of Qatar"),
|
|
("RE", "REU", "Réunion"),
|
|
("RO", "ROU", "Romania"),
|
|
("RU", "RUS", "Russian Federation"),
|
|
("RW", "RWA", "Rwandese Republic"),
|
|
("SA", "SAU", "Kingdom of Saudi Arabia"),
|
|
("SD", "SDN", "Republic of the Sudan"),
|
|
("SN", "SEN", "Republic of Senegal"),
|
|
("SG", "SGP", "Republic of Singapore"),
|
|
("GS", "SGS", "South Georgia and the South Sandwich Islands"),
|
|
("SH", "SHN", "Saint Helena, Ascension and Tristan da Cunha"),
|
|
("SJ", "SJM", "Svalbard and Jan Mayen"),
|
|
("SB", "SLB", "Solomon Islands"),
|
|
("SL", "SLE", "Republic of Sierra Leone"),
|
|
("SV", "SLV", "Republic of El Salvador"),
|
|
("SM", "SMR", "Republic of San Marino"),
|
|
("SO", "SOM", "Federal Republic of Somalia"),
|
|
("PM", "SPM", "Saint Pierre and Miquelon"),
|
|
("RS", "SRB", "Republic of Serbia"),
|
|
("SS", "SSD", "Republic of South Sudan"),
|
|
("ST", "STP", "Democratic Republic of Sao Tome and Principe"),
|
|
("SR", "SUR", "Republic of Suriname"),
|
|
("SK", "SVK", "Slovak Republic"),
|
|
("SI", "SVN", "Republic of Slovenia"),
|
|
("SE", "SWE", "Kingdom of Sweden"),
|
|
("SZ", "SWZ", "Kingdom of Eswatini"),
|
|
("SX", "SXM", "Sint Maarten (Dutch part)"),
|
|
("SC", "SYC", "Republic of Seychelles"),
|
|
("SY", "SYR", "Syrian Arab Republic"),
|
|
("TC", "TCA", "Turks and Caicos Islands"),
|
|
("TD", "TCD", "Republic of Chad"),
|
|
("TG", "TGO", "Togolese Republic"),
|
|
("TH", "THA", "Kingdom of Thailand"),
|
|
("TJ", "TJK", "Republic of Tajikistan"),
|
|
("TK", "TKL", "Tokelau"),
|
|
("TM", "TKM", "Turkmenistan"),
|
|
("TL", "TLS", "Democratic Republic of Timor-Leste"),
|
|
("TO", "TON", "Kingdom of Tonga"),
|
|
("TT", "TTO", "Republic of Trinidad and Tobago"),
|
|
("TN", "TUN", "Republic of Tunisia"),
|
|
("TR", "TUR", "Republic of Turkey"),
|
|
("TV", "TUV", "Tuvalu"),
|
|
("TW", "TWN", "Taiwan, Province of China"),
|
|
("TZ", "TZA", "United Republic of Tanzania"),
|
|
("UG", "UGA", "Republic of Uganda"),
|
|
("UA", "UKR", "Ukraine"),
|
|
("UM", "UMI", "United States Minor Outlying Islands"),
|
|
("UY", "URY", "Eastern Republic of Uruguay"),
|
|
("US", "USA", "United States of America"),
|
|
("UZ", "UZB", "Republic of Uzbekistan"),
|
|
("VA", "VAT", "Holy See (Vatican City State)"),
|
|
("VC", "VCT", "Saint Vincent and the Grenadines"),
|
|
("VE", "VEN", "Bolivarian Republic of Venezuela"),
|
|
("VG", "VGB", "British Virgin Islands"),
|
|
("VI", "VIR", "Virgin Islands of the United States"),
|
|
("VN", "VNM", "Socialist Republic of Viet Nam"),
|
|
("VU", "VUT", "Republic of Vanuatu"),
|
|
("WF", "WLF", "Wallis and Futuna"),
|
|
("WS", "WSM", "Independent State of Samoa"),
|
|
("YE", "YEM", "Republic of Yemen"),
|
|
("ZA", "ZAF", "Republic of South Africa"),
|
|
("ZM", "ZMB", "Republic of Zambia"),
|
|
("ZW", "ZWE", "Republic of Zimbabwe"),
|
|
]
|
|
|
|
|
|
def get_countries_alpha2():
|
|
res = {}
|
|
for line in _dataset:
|
|
res[line[0]] = line[2]
|
|
return res
|
|
|
|
|
|
def get_countries_alpha3():
|
|
res = {}
|
|
for line in _dataset:
|
|
res[line[1]] = line[2]
|
|
return res
|