# coding=utf-8
from collections import namedtuple

ISO_type = namedtuple("ISO_type", "country	currency	mnemonic	cusip	fraction".split("\t"))

# Source : http://www.currency-iso.org

ISO_currencies = [ ISO_type(*cur.split("\t")) for cur in """AFGHANISTAN	Afghani	AFN	971	2
ÅLAND ISLANDS	Euro	EUR	978	2
ALBANIA	Lek	ALL	008	2
ALGERIA	Algerian Dinar	DZD	012	2
AMERICAN SAMOA	US Dollar	USD	840	2
ANDORRA	Euro	EUR	978	2
ANGOLA	Kwanza	AOA	973	2
ANGUILLA	East Caribbean Dollar	XCD	951	2
ANTIGUA AND BARBUDA	East Caribbean Dollar	XCD	951	2
ARGENTINA	Argentine Peso	ARS	032	2
ARMENIA	Armenian Dram	AMD	051	2
ARUBA	Aruban Florin	AWG	533	2
AUSTRALIA	Australian Dollar	AUD	036	2
AUSTRIA	Euro	EUR	978	2
AZERBAIJAN	Azerbaijanian Manat	AZN	944	2
BAHAMAS	Bahamian Dollar	BSD	044	2
BAHRAIN	Bahraini Dinar	BHD	048	3
BANGLADESH	Taka	BDT	050	2
BARBADOS	Barbados Dollar	BBD	052	2
BELARUS	Belarussian Ruble	BYR	974	0
BELGIUM	Euro	EUR	978	2
BELIZE	Belize Dollar	BZD	084	2
BENIN	CFA Franc BCEAO	XOF	952	0
BERMUDA	Bermudian Dollar	BMD	060	2
BHUTAN	Ngultrum	BTN	064	2
BHUTAN	Indian Rupee	INR	356	2
BOLIVIA, PLURINATIONAL STATE OF	Boliviano	BOB	068	2
BOLIVIA, PLURINATIONAL STATE OF	Mvdol	BOV	984	2
BONAIRE, SINT EUSTATIUS AND SABA	US Dollar	USD	840	2
BOSNIA AND HERZEGOVINA	Convertible Mark	BAM	977	2
BOTSWANA	Pula	BWP	072	2
BOUVET ISLAND	Norwegian Krone	NOK	578	2
BRAZIL	Brazilian Real	BRL	986	2
BRITISH INDIAN OCEAN TERRITORY	US Dollar	USD	840	2
BRUNEI DARUSSALAM	Brunei Dollar	BND	096	2
BULGARIA	Bulgarian Lev	BGN	975	2
BURKINA FASO	CFA Franc BCEAO	XOF	952	0
BURUNDI	Burundi Franc	BIF	108	0
CAMBODIA	Riel	KHR	116	2
CAMEROON	CFA Franc BEAC	XAF	950	0
CANADA	Canadian Dollar	CAD	124	2
CABO VERDE	Cabo Verde Escudo	CVE	132	2
CAYMAN ISLANDS	Cayman Islands Dollar	KYD	136	2
CENTRAL AFRICAN REPUBLIC	CFA Franc BEAC	XAF	950	0
CHAD	CFA Franc BEAC	XAF	950	0
CHILE	Unidad de Fomento	CLF	990	4
CHILE	Chilean Peso	CLP	152	0
CHINA	Yuan Renminbi	CNY	156	2
CHRISTMAS ISLAND	Australian Dollar	AUD	036	2
COCOS (KEELING) ISLANDS	Australian Dollar	AUD	036	2
COLOMBIA	Colombian Peso	COP	170	2
COLOMBIA	Unidad de Valor Real	COU	970	2
COMOROS	Comoro Franc	KMF	174	0
CONGO	CFA Franc BEAC	XAF	950	0
CONGO, DEMOCRATIC REPUBLIC OF THE 	Congolese Franc	CDF	976	2
COOK ISLANDS	New Zealand Dollar	NZD	554	2
COSTA RICA	Costa Rican Colon	CRC	188	2
CÔTE D'IVOIRE	CFA Franc BCEAO	XOF	952	0
CROATIA	Croatian Kuna	HRK	191	2
CUBA	Peso Convertible	CUC	931	2
CUBA	Cuban Peso	CUP	192	2
CURAÇAO	Netherlands Antillean Guilder	ANG	532	2
CYPRUS	Euro	EUR	978	2
CZECH REPUBLIC	Czech Koruna	CZK	203	2
DENMARK	Danish Krone	DKK	208	2
DJIBOUTI	Djibouti Franc	DJF	262	0
DOMINICA	East Caribbean Dollar	XCD	951	2
DOMINICAN REPUBLIC	Dominican Peso	DOP	214	2
ECUADOR	US Dollar	USD	840	2
EGYPT	Egyptian Pound	EGP	818	2
EL SALVADOR	El Salvador Colon	SVC	222	2
EL SALVADOR	US Dollar	USD	840	2
EQUATORIAL GUINEA	CFA Franc BEAC	XAF	950	0
ERITREA	Nakfa	ERN	232	2
ESTONIA	Euro	EUR	978	2
ETHIOPIA	Ethiopian Birr	ETB	230	2
EUROPEAN UNION	Euro	EUR	978	2
FALKLAND ISLANDS (MALVINAS)	Falkland Islands Pound	FKP	238	2
FAROE ISLANDS	Danish Krone	DKK	208	2
FIJI	Fiji Dollar	FJD	242	2
FINLAND	Euro	EUR	978	2
FRANCE	Euro	EUR	978	2
FRENCH GUIANA	Euro	EUR	978	2
FRENCH POLYNESIA	CFP Franc	XPF	953	0
FRENCH SOUTHERN TERRITORIES	Euro	EUR	978	2
GABON	CFA Franc BEAC	XAF	950	0
GAMBIA	Dalasi	GMD	270	2
GEORGIA	Lari	GEL	981	2
GERMANY	Euro	EUR	978	2
GHANA	Ghana Cedi	GHS	936	2
GIBRALTAR	Gibraltar Pound	GIP	292	2
GREECE	Euro	EUR	978	2
GREENLAND	Danish Krone	DKK	208	2
GRENADA	East Caribbean Dollar	XCD	951	2
GUADELOUPE	Euro	EUR	978	2
GUAM	US Dollar	USD	840	2
GUATEMALA	Quetzal	GTQ	320	2
GUERNSEY	Pound Sterling	GBP	826	2
GUINEA	Guinea Franc	GNF	324	0
GUINEA-BISSAU	CFA Franc BCEAO	XOF	952	0
GUYANA	Guyana Dollar	GYD	328	2
HAITI	Gourde	HTG	332	2
HAITI	US Dollar	USD	840	2
HEARD ISLAND AND McDONALD ISLANDS	Australian Dollar	AUD	036	2
HOLY SEE (VATICAN CITY STATE)	Euro	EUR	978	2
HONDURAS	Lempira	HNL	340	2
HONG KONG	Hong Kong Dollar	HKD	344	2
HUNGARY	Forint	HUF	348	2
ICELAND	Iceland Krona	ISK	352	0
INDIA	Indian Rupee	INR	356	2
INDONESIA	Rupiah	IDR	360	2
IRAN, ISLAMIC REPUBLIC OF	Iranian Rial	IRR	364	2
IRAQ	Iraqi Dinar	IQD	368	3
IRELAND	Euro	EUR	978	2
ISLE OF MAN	Pound Sterling	GBP	826	2
ISRAEL	New Israeli Sheqel	ILS	376	2
ITALY	Euro	EUR	978	2
JAMAICA	Jamaican Dollar	JMD	388	2
JAPAN	Yen	JPY	392	0
JERSEY	Pound Sterling	GBP	826	2
JORDAN	Jordanian Dinar	JOD	400	3
KAZAKHSTAN	Tenge	KZT	398	2
KENYA	Kenyan Shilling	KES	404	2
KIRIBATI	Australian Dollar	AUD	036	2
KOREA, DEMOCRATIC PEOPLE’S REPUBLIC OF	North Korean Won	KPW	408	2
KOREA, REPUBLIC OF	Won	KRW	410	0
KUWAIT	Kuwaiti Dinar	KWD	414	3
KYRGYZSTAN	Som	KGS	417	2
LAO PEOPLE’S DEMOCRATIC REPUBLIC	Kip	LAK	418	2
LATVIA	Euro	EUR	978	2
LEBANON	Lebanese Pound	LBP	422	2
LESOTHO	Loti	LSL	426	2
LESOTHO	Rand	ZAR	710	2
LIBERIA	Liberian Dollar	LRD	430	2
LIBYA	Libyan Dinar	LYD	434	3
LIECHTENSTEIN	Swiss Franc	CHF	756	2
LITHUANIA	Lithuanian Litas	LTL	440	2
LUXEMBOURG	Euro	EUR	978	2
MACAO	Pataca	MOP	446	2
MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF	Denar	MKD	807	2
MADAGASCAR	Malagasy Ariary	MGA	969	2
MALAWI	Kwacha	MWK	454	2
MALAYSIA	Malaysian Ringgit	MYR	458	2
MALDIVES	Rufiyaa	MVR	462	2
MALI	CFA Franc BCEAO	XOF	952	0
MALTA	Euro	EUR	978	2
MARSHALL ISLANDS	US Dollar	USD	840	2
MARTINIQUE	Euro	EUR	978	2
MAURITANIA	Ouguiya	MRO	478	2
MAURITIUS	Mauritius Rupee	MUR	480	2
MAYOTTE	Euro	EUR	978	2
MEXICO	Mexican Peso	MXN	484	2
MEXICO	Mexican Unidad de Inversion (UDI)	MXV	979	2
MICRONESIA, FEDERATED STATES OF	US Dollar	USD	840	2
MOLDOVA, REPUBLIC OF	Moldovan Leu	MDL	498	2
MONACO	Euro	EUR	978	2
MONGOLIA	Tugrik	MNT	496	2
MONTENEGRO	Euro	EUR	978	2
MONTSERRAT	East Caribbean Dollar	XCD	951	2
MOROCCO	Moroccan Dirham	MAD	504	2
MOZAMBIQUE	Mozambique Metical	MZN	943	2
MYANMAR	Kyat	MMK	104	2
NAMIBIA	Namibia Dollar	NAD	516	2
NAMIBIA	Rand	ZAR	710	2
NAURU	Australian Dollar	AUD	036	2
NEPAL	Nepalese Rupee	NPR	524	2
NETHERLANDS	Euro	EUR	978	2
NEW CALEDONIA	CFP Franc	XPF	953	0
NEW ZEALAND	New Zealand Dollar	NZD	554	2
NICARAGUA	Cordoba Oro	NIO	558	2
NIGER	CFA Franc BCEAO	XOF	952	0
NIGERIA	Naira	NGN	566	2
NIUE	New Zealand Dollar	NZD	554	2
NORFOLK ISLAND	Australian Dollar	AUD	036	2
NORTHERN MARIANA ISLANDS	US Dollar	USD	840	2
NORWAY	Norwegian Krone	NOK	578	2
OMAN	Rial Omani	OMR	512	3
PAKISTAN	Pakistan Rupee	PKR	586	2
PALAU	US Dollar	USD	840	2
PANAMA	Balboa	PAB	590	2
PANAMA	US Dollar	USD	840	2
PAPUA NEW GUINEA	Kina	PGK	598	2
PARAGUAY	Guarani	PYG	600	0
PERU	Nuevo Sol	PEN	604	2
PHILIPPINES	Philippine Peso	PHP	608	2
PITCAIRN	New Zealand Dollar	NZD	554	2
POLAND	Zloty	PLN	985	2
PORTUGAL	Euro	EUR	978	2
PUERTO RICO	US Dollar	USD	840	2
QATAR	Qatari Rial	QAR	634	2
RÉUNION	Euro	EUR	978	2
ROMANIA	New Romanian Leu	RON	946	2
RUSSIAN FEDERATION	Russian Ruble	RUB	643	2
RWANDA	Rwanda Franc	RWF	646	0
SAINT BARTHÉLEMY	Euro	EUR	978	2
SAINT HELENA, ASCENSION AND TRISTAN DA CUNHA	Saint Helena Pound	SHP	654	2
SAINT KITTS AND NEVIS	East Caribbean Dollar	XCD	951	2
SAINT LUCIA	East Caribbean Dollar	XCD	951	2
SAINT MARTIN (FRENCH PART)	Euro	EUR	978	2
SAINT PIERRE AND MIQUELON	Euro	EUR	978	2
SAINT VINCENT AND THE GRENADINES	East Caribbean Dollar	XCD	951	2
SAMOA	Tala	WST	882	2
SAN MARINO	Euro	EUR	978	2
SAO TOME AND PRINCIPE	Dobra	STD	678	2
SAUDI ARABIA	Saudi Riyal	SAR	682	2
SENEGAL	CFA Franc BCEAO	XOF	952	0
SERBIA	Serbian Dinar	RSD	941	2
SEYCHELLES	Seychelles Rupee	SCR	690	2
SIERRA LEONE	Leone	SLL	694	2
SINGAPORE	Singapore Dollar	SGD	702	2
SINT MAARTEN (DUTCH PART)	Netherlands Antillean Guilder	ANG	532	2
SLOVAKIA	Euro	EUR	978	2
SLOVENIA	Euro	EUR	978	2
SOLOMON ISLANDS	Solomon Islands Dollar	SBD	090	2
SOMALIA	Somali Shilling	SOS	706	2
SOUTH AFRICA	Rand	ZAR	710	2
SOUTH SUDAN	South Sudanese Pound	SSP	728	2
SPAIN	Euro	EUR	978	2
SRI LANKA	Sri Lanka Rupee	LKR	144	2
SUDAN	Sudanese Pound	SDG	938	2
SURINAME	Surinam Dollar	SRD	968	2
SVALBARD AND JAN MAYEN	Norwegian Krone	NOK	578	2
SWAZILAND	Lilangeni	SZL	748	2
SWEDEN	Swedish Krona	SEK	752	2
SWITZERLAND	WIR Euro	CHE	947	2
SWITZERLAND	Swiss Franc	CHF	756	2
SWITZERLAND	WIR Franc	CHW	948	2
SYRIAN ARAB REPUBLIC	Syrian Pound	SYP	760	2
TAIWAN, PROVINCE OF CHINA	New Taiwan Dollar	TWD	901	2
TAJIKISTAN	Somoni	TJS	972	2
TANZANIA, UNITED REPUBLIC OF	Tanzanian Shilling	TZS	834	2
THAILAND	Baht	THB	764	2
TIMOR-LESTE	US Dollar	USD	840	2
TOGO	CFA Franc BCEAO	XOF	952	0
TOKELAU	New Zealand Dollar	NZD	554	2
TONGA	Pa’anga	TOP	776	2
TRINIDAD AND TOBAGO	Trinidad and Tobago Dollar	TTD	780	2
TUNISIA	Tunisian Dinar	TND	788	3
TURKEY	Turkish Lira	TRY	949	2
TURKMENISTAN	Turkmenistan New Manat	TMT	934	2
TURKS AND CAICOS ISLANDS	US Dollar	USD	840	2
TUVALU	Australian Dollar	AUD	036	2
UGANDA	Uganda Shilling	UGX	800	0
UKRAINE	Hryvnia	UAH	980	2
UNITED ARAB EMIRATES	UAE Dirham	AED	784	2
UNITED KINGDOM	Pound Sterling	GBP	826	2
UNITED STATES	US Dollar	USD	840	2
UNITED STATES	US Dollar (Next day)	USN	997	2
UNITED STATES MINOR OUTLYING ISLANDS	US Dollar	USD	840	2
URUGUAY	Uruguay Peso en Unidades Indexadas (URUIURUI)	UYI	940	0
URUGUAY	Peso Uruguayo	UYU	858	2
UZBEKISTAN	Uzbekistan Sum	UZS	860	2
VANUATU	Vatu	VUV	548	0
VENEZUELA, BOLIVARIAN REPUBLIC OF	Bolivar	VEF	937	2
VIET NAM	Dong	VND	704	0
VIRGIN ISLANDS (BRITISH)	US Dollar	USD	840	2
VIRGIN ISLANDS (U.S.)	US Dollar	USD	840	2
WALLIS AND FUTUNA	CFP Franc	XPF	953	0
WESTERN SAHARA	Moroccan Dirham	MAD	504	2
YEMEN	Yemeni Rial	YER	886	2
ZAMBIA	Zambian Kwacha	ZMW	967	2
ZIMBABWE	Zimbabwe Dollar	ZWL	932	2""".split("\n")]
