Skip to main content

Async Python HiRez API wrapper

This project was created to simplify access to the API, as well as incorporate some data pre-processing and consistency. I am aware that PyRez already exists, however this project aims to do couple of things differently:

  • It's entirely async from the ground up, built using 'aiohttp'
  • Uses modern objective programming approach
  • Utilizes a local data cache to return data-rich objects

This library is supposed to be used as a module. As of right now, only PaladinsAPI is supported. Smite support is planned - please read below.

Currently supported:

  • getgods / getchampions and getitems regarding god / champion and card / talent / shop item information
  • getplayer (Player stats)
  • getplayerbatch (Multiple player stats at once)
  • getplayeridbyname, getplayeridsbygamertag and searchplayers under a single, intuitive method (Finding the players)
  • getfriends (Player friends)
  • getgodranks / getchampionranks (God / Champion stats)
  • getplayerloadouts (Player loadouts for each god / champion)
  • getplayerstatus (Player status)
  • getmatchhistory (Player's recent matches)
  • getmatchdetails (Match details, by the ID or from player's recent matches)
  • getplayeridbyportaluserid (Finding the player by their Portal ID)
  • getmatchplayerdetails (Information about the current player's match)
  • getplayerachievements (Player overall match stats)
  • getmatchdetailsbatch (Fetching multiple matches at once)
  • getmatchidsbyqueue (Fetching all matches by queue)
  • getqueuestats (Player match stats by queue)

There are plans on expanding the existing framework to incorporate the above and below:

  • Adding documentation
  • Support for SmiteAPI (support Smite endpoint URL)
    • Support for Teams
      • Support for getteamdetails endpoint
      • Support for getteamplayers endpoint
      • Support for searchteams endpoint

If you have some experience with Smite and it's API, and would be interested in working with me together on expanding this project, please don't hessitate to contact me (you can find contact information below).

Requirements

  • Python 3.8+
  • aiohttp 2.0+

Resources

Usage

Please see example.py for more examples.

import asyncio

import arez  # import the wrapper

DEV_ID = 1234  # your Developer ID (example)
AUTH_KEY = "L2U3M60A03662R24UKOMY0FIT4S2IBKU"  # your Auth Key (example)

async def main():
    # create an API instance
    api = arez.PaladinsAPI(DEV_ID, AUTH_KEY)
    # fetch Player stats
    player = await api.get_player(5959045)
    # display your rank
    print(player.ranked_best.rank.name)
    # close the API once you're done with it
    await api.close()

loop = asyncio.get_event_loop()
loop.run_until_complete(main())  # run the async loop

Support

Buy me a coffee Support me on Patreon

Contact

Reddit: https://www.reddit.com/u/DevilXD

Discord: DevilXD#4437

Notes

This is an alpha version - as of right now, everything is a subject to change. Once both Paladins and Smite (and maybe Realm Royale) APIs are supported, this wrapper is going to have it's v1.0 release, and I will try to manage the versioning the proper way from there.

Release files for aRez 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aRez 0.2.4
File Size Uploaded
aRez-0.2.4.tar.gz 76.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aRez 0.2.4
File Interpreter ABI Platform
aRez-0.2.4-py3-none-any.whl Python 3 none any Details

Total release size: 167.3 kB

Release files / aRez-0.2.4.tar.gz

Download URL aRez-0.2.4.tar.gz
Size 76.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b93622ca404addc23f5e2aaee2038bdadc245bf23da7438f87427eb2c73f0737
BLAKE2b-256 checksum
How to use checksums
c85ec3e811b5f973f2ab48ed17cf876d568a900b07271784b232972f9b75c221
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/29.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.4 tqdm/4.56.2 importlib-metadata/3.10.1 keyring/23.0.1 rfc3986/1.4.0 colorama/0.4.4 CPython/3.8.10

Release files / aRez-0.2.4-py3-none-any.whl

Download URL aRez-0.2.4-py3-none-any.whl
Size 91.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0e7f1cc76623e78eadefd871461d73a839572c1963786b70b769fb3251f47208
BLAKE2b-256 checksum
How to use checksums
aa7ff6f5431d830a8638683c57b1eac54d9e27ae75008c3e09f6113c716ab3c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/29.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.4 tqdm/4.56.2 importlib-metadata/3.10.1 keyring/23.0.1 rfc3986/1.4.0 colorama/0.4.4 CPython/3.8.10

Release history Release notifications | RSS feed

This release

0.2.4 This release

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page