Skip to content
/ ddapi Public

The ddapi tool is used to parsing or retrieving information from the DDraceNetwork game using the official api.

License

Notifications You must be signed in to change notification settings

ByFox213/ddapi

Repository files navigation

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

other examples

About

The ddapi tool is used to parsing or retrieving information from the DDraceNetwork game using the official api.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages