Skip to content

Client

HelldiveAPIClient is the main entry point. Instantiate it with your app name and contact info, then access data through its module attributes (client.planets, client.assignments, etc.).

Use it as a context manager to ensure the underlying HTTP connection is closed cleanly:

with HelldiveAPIClient(client="myapp", contact="me@example.com") as client:
    war = client.war.get()

helldivepy.client.HelldiveAPIClient

HelldiveAPIClient(
    client: str = "helldivepy",
    contact: str = "github:ajxd2/helldive.py",
    base_url: str = "https://api.helldivers2.dev/api",
)

Create a new API client.

Parameters:

Name Type Description Default
client str

Your application name, sent as X-Super-Client. Identifies your app to the API operators.

'helldivepy'
contact str

Contact info for your app, sent as X-Super-Contact. Typically a GitHub URL or email address.

'github:ajxd2/helldive.py'
base_url str

API base URL. Override for testing or alternative deployments.

'https://api.helldivers2.dev/api'