Skip to content
Asynchronous wrapper for Dathost's API.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Install git and run pip install git+

Dathost's API documentation

Useful notes:

  • The path is counted from the root node as seen in the file manager in the control panel, i.e. to write csgo/cfg/server.cfg the path would be cfg/server.cfg, if the path ends with / a directory will be created and the file parameter will be ignored.
  • There is a upload limit of 100MB on, our wrapper uses to upload files up to 500MB.
  • Pathways should always end in a '/'.
  • Sync function should be called before downloading files.
  • Our API wrapper will return false if it fails, so check for that.
  • Check Dathost's documentation for data returns, if it doesn't return any data our wrapper will just return True.
  • Make sure to read the docstrings for help.


from aiodathost.aiodathost import dathost

dathost = dathost(username = "", password = "********", route = "")

async def example():
    # Starts given server id.
    await dathost.start(server_id)

    # Resets given server id.
    await dathost.reset(server_id)

    # Spawns new dathost server.
    # e.g. server_details={"game": "csgo", etc}
    await dathost.create(server_details)

    #  Returns list of domains on dathost.
    domains = await

    # Stops given server.
    await dathost.stop(server_id)

    # Sends a line to the console.
    await dathost.send_console(server_id, console_line)

    # Deletes given server.
    await dathost.delete(server_id)

    # Deletes file from given server.
    # Pathway should always end in a /.
    await dathost.delete_file(server_id, pathway, file_name)

    # Syncs files between given server.
    await dathost.sync(server_id)

    # Uploads file to game server.
    await dathost.upload(server_id, pathway, local_pathway, file_name, upload_route = "")

    # Unzips file on game server.
    await dathost.unzip(server_id, pathway, file_name)

    # Generate a new random ftp password.
    await dathost.ftp_regenerate(server_id)

    # Returns details on a game server.
    details = await dathost.game_details(server_id)

    # Returns files on a game server.
    # Pathway should always end in a /.
    files = await dathost.files(server_id, pathway = "", hide_default_files = False, with_filesizes = False)

    # Downloads a file from the game server.
    # Use aiofiles to save it.
    downloaded_file = await, pathway, file_name)

    # Gets x amount of lines from the console from the game server.
    console = await dathost.get_console(server_id, max_lines = 1)

    # Returns account infomation.
    account_details = await dathost.account()

    # Returns full list of details about all the game servers.
    all_servers_details = await dathost.details()

    # Returns metricis saved by dathost about a game server.
    metrics = await dathost.metrics(server_id)

    # Clones a game server and returns infomation on it.
    cloning = await dathost.clone(server_id)
You can’t perform that action at this time.