A way to display currency?
Question: I have database values such as the following:

    
    
    price      currency
    10.99      USD
    13.99      EUR
    

Is there a python library or something that I can use for help with displaying
the currency properly on a storefront? For example, it should be:

    
    
    10.99 USD ==> $10.99
    13.99 EUR (france) ==> 13,99 €
    


Answer: You could use [babel](http://babel.pocoo.org/docs/api/numbers/) like this:

    
    
    import babel.numbers as numbers
    print(numbers.format_currency(10.99, 'USD', locale='en_US'))
    $10.99
    print(numbers.format_currency(13.99, 'EUR', locale='fr_FR'))
    13,99 €
    

PS. Under the hood, [money uses
babel](https://github.com/carlospalol/money#installation) for locale-aware
formatting.

