import requests


def send_speed(url, data, pw):
    """
    Send bandwidth result to external source.
        :param url: Endpoint to send a POST request to
        :param data: Dictionary of speed, units, and time
        :param pw: Password for the endpoint
        :return: status code of the request
    """
    data['pw'] = pw
    r = requests.post(url, json=data)
    return r.status_code