kiwi.datatypes
module documentationkiwi
Data type converters with locale and currency support.
Provides routines for converting data to and from strings. Simple example:
>>> from kiwi.datatypes import converter >>> converter.from_string(int, '1,234') '1234' >>> converter.from_string(float, '1,234') '1234.0' >>> converter.to_string(currency, currency('10.5')) '$10.50'
Class | Decimal | Undocumented |
Function | GetLocaleInfo 0 | Undocumented |
Function | GetLocaleInfo | Undocumented |
Class | ValidationError | Undocumented |
Class | ConverterRegistry | No class docstring; 4/9 methods documented |
Class | BaseConverter | No summary |
Function | lformat | Like locale.format but with grouping enabled |
Function | get_localeconv | Undocumented |
Function | filter_locale | No summary |
Function | format_price | Formats a price according to the current locales monetary settings |
Class | _StringConverter | Undocumented |
Class | _UnicodeConverter | Undocumented |
Class | _IntConverter | No class docstring; 2/2 methods documented |
Class | _LongConverter | Undocumented |
Class | _BoolConverter | No class docstring; 1/2 methods documented |
Class | _FloatConverter | No class docstring; 2/2 methods documented |
Class | _DecimalConverter | Undocumented |
Class | _BaseDateTimeConverter | Abstract class for converting datatime objects to and from strings @cvar date_format: @cvar lang_constant: |
Class | _TimeConverter | Undocumented |
Class | _DateTimeConverter | Undocumented |
Class | _DateConverter | Undocumented |
Class | _ObjectConverter | Undocumented |
Class | _EnumConverter | Undocumented |
Removes the locale specific data from the value string. Currently we only remove the thousands separator and convert the decimal point. The returned value of this function can safely be passed to float()
Parameters | value | value to convert |
monetary | if we should treat it as monetary data or not | |
Returns | the value without locale specific data |