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 details)
Built Distribution
ddapi-0.1.2-py3-none-any.whl
(7.5 kB
view details)
File details
Details for the file ddapi-0.1.2.tar.gz
.
File metadata
- Download URL: ddapi-0.1.2.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b195aefb312f14e717ea52ad590eb2fa18c45e13d56aa01431bd7b30cffa1e4f |
|
MD5 | 22d500ea669e87e4a1d80110455bcbda |
|
BLAKE2b-256 | 903b1921a38d8943c21265aa6c82a87a04672da46202b66729e21acbb9b95f24 |
File details
Details for the file ddapi-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: ddapi-0.1.2-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5248adda118cb78b6e8a86ca3933ba73187e6527689220f427b19ee9254b8732 |
|
MD5 | c7795f3f8617b92e86cadc16beda9d35 |
|
BLAKE2b-256 | 67c8f3c2666cf59905aff44768272f05cf28d99746f264855465c34a8905a481 |