Creating the currency enumeration

Another thing we need to do before starting the command line parser is to create an enumeration with the possible currencies that the users of our application will be able to choose from. Let's go ahead and create a file called currency.py in the currency_converter/currency_converter/core directory with the following contents:

from enum import Enumclass Currency(Enum):    AUD = 'Australia Dollar'    BGN = 'Bulgaria Lev'    BRL = 'Brazil Real'    CAD = 'Canada Dollar'    CHF = 'Switzerland Franc'    CNY = 'China Yuan/Renminbi'    CZK = 'Czech Koruna'    DKK = 'Denmark Krone'    GBP = 'Great Britain Pound'    HKD = 'Hong Kong Dollar'    HRK = 'Croatia Kuna'    HUF = 'Hungary Forint'    IDR = 'Indonesia Rupiah'    ILS = 'Israel New Shekel' INR = 'India ...

Get Python Programming Blueprints now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.