Tiny Hi-Rez API wrapper
Project description
Charybdis
Tiny Hi-Rez API Python wrapper that I wrote to use in my Smite related projects (and to play around with async).
Hi-Rez API docs: https://webcdn.hirezstudios.com/hirez-studios/legal/smite-api-developer-guide.pdf
Other Python wrappers:
Installation
pip install charybdis
Usage
Sync
import os
import charybdis
api = charybdis.Api(
# These are also the default values.
base_url=charybdis.Api.smite_pc_url,
dev_id=os.getenv("SMITE_DEV_ID"),
auth_key=os.getenv("SMITE_AUTH_KEY")
)
# Returns deserialized JSON.
scylla_skins = api.call_method(
"getgodskins", # Method name.
"1988", # God ID - Scylla.
"1" # Language ID - English.
)
for scylla_skin in scylla_skins:
print(scylla_skin["skin_name"])
# Output:
# Standard Scylla
# Bewitching Bunny
# Child's Play
# COG Scylla
# and many more...
Async
import asyncio
import charybdis
async def main():
async with charybdis.Api() as api:
patch_info = await api.acall_method("getpatchinfo")
print(patch_info["version_string"])
asyncio.run(main())
# Output:
# 9.6
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
charybdis-1.0.1.tar.gz
(3.5 kB
view hashes)
Built Distribution
Close
Hashes for charybdis-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41e60fc38b53aa261a80fe23e2d392febba91f0f5d8646c98f98c6882efe8913 |
|
MD5 | dc7bcbb575691c6e66e2868b98acf4f4 |
|
BLAKE2b-256 | 365008be0d03b15a4ea5502c74010ac387096d85256a5c557bc399df73bd6d70 |