ddapi
Project description
ddapi is an api from the ddnet and qwik website
Installation
pip install ddapi
Usage/Examples
DDnet
import asyncio
from ddapi import DDnetApi, DDPlayer
async def main():
obj = DDnetApi()
nickname = "Cor"
user: DDPlayer = await obj.player(nickname)
if user is None:
return "Player not found"
print(f"{user.player}: {user.points.points}")
# Cor: 31473
await obj.close() # Closing client Not necessary
assert isinstance(user, DDPlayer)
asyncio.run(main())
qwik
import asyncio
from ddapi import Player, QwikAPI
async def main():
obj = QwikAPI()
nickname = "ByFox"
user = await obj.player(nickname)
if user is None:
return "Player not found"
print(f"{user.player}: {user.points.points}")
# Cor: 31473
await obj.close() # Closing client Not necessary
assert isinstance(user, Player)
asyncio.run(main())
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
ddapi-0.1.2.tar.gz
(7.1 kB
view hashes)
Built Distribution
ddapi-0.1.2-py3-none-any.whl
(7.5 kB
view hashes)