Settings

ServerSettings

class dathost.settings.ServerSettings(name: Optional[str] = None, location: Optional[str] = None, custom_domain: Optional[str] = None, autostop: Optional[bool] = None, autostop_minutes: Optional[int] = None, mysql: Optional[bool] = None, scheduled_commands: Optional[List[str]] = None, user_data: Optional[str] = None, reboot_on_crash: Optional[bool] = None, max_disk_usage_gb: Optional[int] = None, manual_sort_order: Optional[int] = None, core_dump: Optional[bool] = None, prefer_dedicated: Optional[bool] = None)
csgo(slots: Optional[int] = None, tickrate: Optional[int] = None, game_token: Optional[str] = None, rcon_password: Optional[str] = None, game_mode: Optional[str] = None, autoload_configs: Optional[List[str]] = None, disable_bots: bool = False, workshop_start_map_id: Optional[int] = None, csay_plugin: bool = False, gotv: bool = False, sourcemod: bool = False, insecure: bool = False, map_group: Optional[str] = None, start_map: Optional[str] = None, password: Optional[str] = None, pure: bool = True, admins: Optional[List[Any]] = None, plugins: Optional[List[Any]] = None, steam_key: Optional[str] = None, workshop_id: Optional[int] = None, maps_source: Optional[str] = None)dathost.settings.ServerSettings

Used for configuring a CS: GO server.

Parameters
  • slots (int) –

  • game_token (str) –

  • tickrate (int) –

  • game_mode (str, optional) – by default None

  • autoload_configs (List[str], optional) – by default None

  • disable_bots (bool, optional) – by default False

  • csay_plugin (bool, optional) – by default False

  • gotv (bool, optional) – by default False

  • sourcemod (bool, optional) – by default False

  • insecure (bool, optional) – by default False

  • map_group (str, optional) – by default None

  • start_map (str, optional) – by default None

  • password (str, optional) – by default None

  • pure (bool, optional) – by default True

  • rcon_password (str, optional) – by default None

  • admins (List[Any], optional) – by default None

  • plugins (List[Any], optional) – by default None

  • steam_key (str, optional) – by default None

  • workshop_id (int, optional) – by default None

  • workshop_start_map_id (int, optional) – by default None

  • maps_source (int, optional) – by default None

Raises
Returns

Return type

ServerSettings

teamspeak(slots: int)dathost.settings.ServerSettings

Used for configuring a teamspeak server.

Parameters

slots (int) –

Raises
  • MultipleGames – Raised when you attempt to create one server with multiple games.

  • InvalidSlotSize – Raised when slot size is below 5 or above 500.

Returns

Return type

ServerSettings

tf2(slots: Optional[int] = None, rcon_password: Optional[str] = None, gotv: bool = False, sourcemod: bool = False, insecure: bool = False, password: Optional[str] = None, admins: Optional[list] = None)dathost.settings.ServerSettings

Used for configuring a TF2 server.

Parameters
  • rcon_password (str) –

  • slots (int) –

  • gotv (bool, optional) – by default False

  • sourcemod (bool, optional) – by default False

  • insecure (bool, optional) – by default False

  • password (str, optional) – by default None

  • admins (list, optional) – by default None

Raises
  • MultipleGames – Raised when you attempt to create one server with multiple games.

  • InvalidSlotSize – Raised when slot size is below 5 or above 32.

Returns

Return type

ServerSettings

valheim(password: Optional[str] = None, world_name: Optional[str] = None, plus: Optional[bool] = None, admins: Optional[List[Any]] = None)dathost.settings.ServerSettings

Used to configure valheim server.

Parameters
  • password (str, optional) – by default None

  • world_name (str, optional) – by default None

  • plus (bool, optional) – by default None

  • admins (List[Any], optional) – List of SteamIDs in any format, by default None

Returns

Return type

ServerSettings

Raises

MultipleGames

MatchSettings

class dathost.settings.MatchSettings(connection_time: int = 300, knife_round: bool = False, wait_for_spectators: bool = True, warmup_time: int = 15)
playwin(webhook: Optional[str] = None)dathost.settings.MatchSettings

Enables playwin AC.

Parameters

webhook (str, optional) – Webhook to push playwin results, by default None

Returns

Return type

MatchSettings

spectators(players: list)dathost.settings.MatchSettings

Spectators

Parameters

players (list) – List of spectator steam IDs, steamID 64, 32 & u are supported.

Returns

Return type

MatchSettings

team_1(players: list)dathost.settings.MatchSettings

Team 1 players

Parameters

players (list) – List of spectator steam IDs, steamID 64, 32 & u are supported.

Returns

Return type

MatchSettings

team_2(players: list)dathost.settings.MatchSettings

Team 2 players

Parameters

players (list) – List of spectator steam IDs, steamID 64, 32 & u are supported.

Returns

Return type

MatchSettings

webhook(match_end: str, round_end: str, authorization: Optional[str] = None)dathost.settings.MatchSettings

Used to set webhooks.

Parameters
  • match_end (str) – URL of match end webhook.

  • round_end (str) – URL of round end webhook.

  • authorization (str, optional) – by default None

Returns

Return type

MatchSettings