Skip to content

Utils

helldivepy.utils

Attributes

helldivepy.utils.FACTIONS module-attribute

FACTIONS = {1: 'Humans', 2: 'Terminids', 3: 'Automaton', 4: 'Illuminate'}

Classes

helldivepy.utils.DiveHarderException

Bases: Exception

Base exception for all DiveHarder exceptions.

helldivepy.utils.DiveHarderAPIConnectionError

Bases: DiveHarderException

Exception raised when the DiveHarder API connection fails.

Functions

helldivepy.utils.hdml_to_md

hdml_to_md(text: str) -> str

Converts a string in HDML (DiveHarder Markup Language) format to Markdown format.

PARAMETER DESCRIPTION
text

The input string in HDML format.

TYPE: str

RETURNS DESCRIPTION
str

The input string converted to Markdown format.

TYPE: str

helldivepy.utils.url_join

url_join(*args)

Join combine URL parts to get the full endpoint address.

helldivepy.utils.parse_faction

parse_faction(faction: int) -> enums.FactionType | None

Parse faction ID to string

PARAMETER DESCRIPTION
faction

The faction ID

TYPE: int

RETURNS DESCRIPTION
str

The faction name

TYPE: FactionType | None