Skip to main content

An API wrapper for the Helldivers 2 Community and official APIs

Project description

Helldivers 2 Python API Wrapper

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hd2api_py-0.0.0.18.tar.gz (79.3 kB view details)

Uploaded Source

Built Distribution

hd2api.py-0.0.0.18-py3-none-any.whl (98.2 kB view details)

Uploaded Python 3

File details

Details for the file hd2api_py-0.0.0.18.tar.gz.

File metadata

  • Download URL: hd2api_py-0.0.0.18.tar.gz
  • Upload date:
  • Size: 79.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for hd2api_py-0.0.0.18.tar.gz
Algorithm Hash digest
SHA256 e588c6f426f83f78a1429c17cb18aa08f6edc4bd5a94d373f993dceeb05c576b
MD5 fe32913dd222fd86b500d532e5b9618d
BLAKE2b-256 e580a469c3ed1ad9daa29fb56f525d42391066812a43d67fb5875ddee9136e5b

See more details on using hashes here.

File details

Details for the file hd2api.py-0.0.0.18-py3-none-any.whl.

File metadata

  • Download URL: hd2api.py-0.0.0.18-py3-none-any.whl
  • Upload date:
  • Size: 98.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for hd2api.py-0.0.0.18-py3-none-any.whl
Algorithm Hash digest
SHA256 4b1a874ae771d6dfa44e6bab3f7a4ed023122540a1775d9909a0f73d2e9d2c48
MD5 4c19cf82f3891c1ffc2944f6e380e800
BLAKE2b-256 733d57f5f9dace3011fa841421c01103000ce897f34a54104be02c61083663d9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page