Python Integration

Integrating the GoodGrids API with a python application is simple. You can create an Excel file from a CSV file with this simple snippet of code:

import requests
from six import BytesIO

def create_excel_file(csv_content):
    Creates an Excel file from CSV text content

    :param csv_content: a string containing the contents of a CSV file
    :return: Binary contents of an Excel file, as bytes
    goodgrids_api_url = ''
    response =
            'file': BytesIO(csv_content),

    return response.content

Make sure to set goodgrids_api_url to your actual API URL.

This code is compatible with both python 2 and python 3.

Found a bug? Have a suggestion on how to improve this documentation? Please send us a note at