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.1.0.tar.gz
(7.9 kB
view hashes)
Built Distribution
aiobungie-0.1.0-py3-none-any.whl
(17.0 kB
view hashes)
Close
Hashes for aiobungie-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73455dac4a59e95a8f134e00568c3c09aba12beee8477a73dab99af293af476d |
|
MD5 | d1501a2d49920f5ca311a6d2b27a0b09 |
|
BLAKE2b-256 | 152731f53c98fde8170dc4724ece46547ad6a8dadf7c9773dea5f1dc75c75d50 |