Boto3: DynamoDB Decimal type not supperted remove

Created on 3 Mar 2016  Â·  1Comment  Â·  Source: boto/boto3

inserted float value error
Float types are not supported. Use Decimal types instead
from

def _is_number(self, value):
        if isinstance(value, (six.integer_types, Decimal)):
            return True
        elif isinstance(value, float):
            raise TypeError(
                'Float types are not supported. Use Decimal types instead.')
        return False

to

        if isinstance(value, (six.integer_types, Decimal)):
            return True
        return False

Uploading スクリーンショット 2016-03-03 21.51.33.png…

http://boto3.readthedocs.org/en/latest/_modules/boto3/dynamodb/types.html

2016-03-03 21 50 30

https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html

duplicate dynamodb feature-request

>All comments

Currently we only support Decimals and integers DynamoDB's number type. We do not support floats because python cannot support DynamoDB's level of precision. Here is an issue summarizing this: https://github.com/boto/boto3/issues/369. That issue is open to track the ability to use floats. Let's move the conversation to that linked issue.

Was this page helpful?
0 / 5 - 0 ratings