def make_baseurl(scheme, host, port=None):
    """Creates URL using given parameters.

    Args
    -----
        scheme (str): http or https
        host (str): hostname
        port (int, optional): Port number as integer

    Returns
    -------
        Formatted URL to use with http apis.
    """
    base_url = None
    if port is None:
        base_url = "{}://{}".format(scheme, host)
    else:
        base_url = "{}://{}:{}".format(scheme, host, port)
    return base_url