A small async api wrapper for the bungie api
Project description
aiobungie
An Asynchronous API wrapper for the bungie API witten in Python.
Installing
pip install aiobungie
Quick Example
import aiobungie
# Without classes.
client = aiobungie.Client(key='YOUR_API_KEY')
async def player(name):
_player = await client.get_player(name)
print(_player.name)
print(_player.icon_path)
print(_player.id)
print(_player.type)
client.loop.run_until_complete(player("Sweatcicle"))
# With classes
class PlayerTest(aiobungie.Client):
def __init__(self):
super().__init__(key='YOUR_API_KEY')
async def player_data(self, player_name: str):
player = await self.get_player(player_name)
try:
print(player.name)
print(player.type)
print(player.id)
print(player.icon_path)
except:
pass
if __name__ == '__main__':
plr = PlayerTest()
plr.loop.run_until_complete(plr.player_data("DeeJ"))
Requirements
- httpx
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
aiobungie-0.2.0.tar.gz
(8.8 kB
view hashes)
Built Distribution
aiobungie-0.2.0-py3-none-any.whl
(18.4 kB
view hashes)
Close
Hashes for aiobungie-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | db9aa04981f7d685b339c0a413a024eadda32854c4b94cd71eed9f868621efda |
|
MD5 | 44478eab64c527aac48947d67aec68b0 |
|
BLAKE2b-256 | c2b2ee639eba733e4e0a7e76280dc9334bfaa61d19eb1a33f61d335af91006c6 |