Skip to main content

Forums / Support / Halo API Support

16807 Pious Academic - A Halo 5 API Python Wrapper


Hey guys, I just finished the first version of an open source Python wrapper I made for the H5 API. I've only just finished the basic functionality but I'll be making it top notch by the end of the weekend. For now, you can find the skeleton of it in the GitHub repository I set up here:

As of now it has the basic rate limit and exception classes set up, as well as functions for each current endpoint on the API. I'll be adding further documentation and tests this weekend when I have time but for now just wanted to get the library up for anyone looking for one to use with python.

I welcome any feedback and additions to the library and will quickly tend to any merge request or issues raised for the library. I hope you can all find great use of it!

Edit: I just finished working out a few bugs so it should be good to go now. Make sure once you have a local copy to change all the "YOUR API KEY HERE" to the key provided on your profile, or you'll get a 401 error.
Hey guys - I just released a much more stable and informative version of Pious Academic. It now has a demo file giving examples on how to use all of the requests with some tests included. I'll be working on making a function later that automatically creates a local library of all the metadata for you, similar to the Halo 4 API where you could obtain all the metadata with ease.

Let me know if you find any issues with the current release or have any suggestions.

Edit: Decided to just create the function that gets all the metadata for your just now. You can find the file "" in my current repository. Make sure you update the paths used to read and dump the data into the JSON files. As of now I also included an up-to-date library of all the metadata in the folder "Metadata", so if you'd like you can just copy that. Enjoy!
Hey I was looking at the file and thought a simple addition to add to the base file is a PlayerID constant at the top so a user could see their stats and only have to modify 2 constants. That constant could also be a list I assume and you could just port a list of PlayerIDs as well.
Yeah that could definitely be added, but keep in mind that a lot of users will likely be looking for stats other than their own. Nonetheless I'll throw a constant at the top and indicate all the spots that you're able to use it. In the case of a list of players, the service record requests use a syntax where multiple players is simply read in as a single string separated by commas. So you could either iterate over the list one gamertag at a time or just append all the tags in the list together along with a comma after each.

I'll add a template to the top of the file for those, so thanks for the suggestion! If you have any future ideas feel free to just make a pull and I'll get to it pretty quickly.