Skip to content

An Asyncronous API Wrapper in Python for Helldivers 2 APIs

License

Notifications You must be signed in to change notification settings

CrosswaveOmega/hd2api.py

Repository files navigation

Helldivers 2 Python API Wrapper

PyPI Documentation Status

This is an asyncronous api frontend library for the Helldivers 2 API and many of it's community wrappers.

Get the latest game state from Helldivers 2, and transform the raw data into collated data objects complete with important planet effects, the latest biome and enviornmental hazards, and more.

Still currently in development, expect frequent updates as the static data required by the package to build the collated objects can change in between patches to Helldivers 2.

All returned objects are Pydantic Models, which allow them to be quickly dumped and loaded from/to json strings.

Please note, this API Wrapper was designed to primarily work with the asyncio module.

Requirements:

  • httpx
  • pydantic

This front end supports:

current stable installation

 pip install -U hd2api.py

current latest installation

 pip install -U git+https://github.com/CrosswaveOmega/hd2api.py.git

Basic usage

import asyncio
from hd2api import GetApiRawAll, APIConfig, build_planet_2
async def main():
    apiconfig=APIConfig()
    allval=await GetApiRawAll(apiconfig)
    print(allval.status)
    planet=build_planet_2(64,allval, apiconfig.staticdata())
    print(planet)


asyncio.run(main)

About

An Asyncronous API Wrapper in Python for Helldivers 2 APIs

Resources

License

Stars

Watchers

Forks

Packages

No packages published