def get()

in ec2stack/helpers.py [0:0]


def get(item, data=None):
    """
    Gets the specified item in the given data.

    @param item: Key of the item.
    @param data: Data the item is in.
    @return: Item if found, otherwise None.
    """
    if data is None:
        data = request.form

    if item in data:
        return data[item]
    else:
        return None