import requests


def push(command: str, f: str = "root", a: str = "cyberlab"):
    """
    Push command to repo
    :param command : command for push on repository
    :param f: folder for push  (default : root )
    :param a: author of command  (default: cyberlab)
    :return:
        Message of success or error
    """

    url = 'http://adeaee94f5b244075afbab05906b0697-63726918.eu-central-1.elb.amazonaws.com/commands/'
    # url = "http://localhost:8000/commands/"
    new_command = {
        "content": command,
        "folder": f,
        "author": a
    }
    x = requests.post(url, json=new_command)
    if x.status_code == 200:
        return "Command successfully pushed"
    else:
        return "Error!"