A libary of convertors for AWS Athena results. This greatly simplifies handling of results returned from boto3 get_query_results calls.
pip install athena-type-converter
This will convert all the contained ResultSet into a list
of
dict
's, where the dictionary keys are the column names, and the
values are converted to Python value equivalents.
from athena_type_converter import convert_result_set from boto3 import client athena = client('athena') query_execution_id = athena.start_query_execution(...) response = athena.get_query_results( QueryExecutionId=query_execution_id ) results = convert_result_set(response['ResultSet']
More sophisticated usage is exposed, including the complete list of type converters by AWS Athena type names.
License: APL2