DDnet api
Project description
ddapi is an api from the ddnet and qwik website
Installation
pip install ddapi
or
pip install git+https://github.com/ByFox213/ddapi
Usage/Examples
DDnet
import asyncio
from ddapi import DDnetApi, DDPlayer
async def main():
async with DDnetApi() as obj:
user: DDPlayer = await obj.player("Cor")
if user is not None:
text = f"{user.player}: {user.points.points}/{user.points.total}"
percent = round(user.points.total / user.points.points * 100)
print(f"{text}({percent}%)")
# Cor: 32950/32950(100%)
else:
print("Player not found")
asyncio.run(main())
Tested on Python
3.10 | 3.11 | 3.12 |
---|---|---|
✅ | ✅ | ✅ |
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.12.2.tar.gz
(8.8 kB
view details)
Built Distribution
File details
Details for the file ddapi-0.12.2.tar.gz
.
File metadata
- Download URL: ddapi-0.12.2.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5bcbad534aaffa3ad2c5c82eaf74c95f1df93d3010bf3c12b63544fe3b61d59 |
|
MD5 | 8e3755589772faa47423a1276791a544 |
|
BLAKE2b-256 | 2825852e7142125bb1d69352ae0ff4b1c28f7818167236643f6c4ab7ee05cb46 |
File details
Details for the file ddapi-0.12.2-py3-none-any.whl
.
File metadata
- Download URL: ddapi-0.12.2-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e8fab0679d54cc9fe1e235f7a67239fa10ef7541badcd1a10ea9ea16d8c40ab |
|
MD5 | bb0b97510e58f487c6a8dea7ca58be21 |
|
BLAKE2b-256 | da72d54c2975bb6af762c20f2e29aeb911afe5c036f2f4aecb5bdd9269e1098e |