Skip to main content

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.11 3.12 3.13

other examples

Project details


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.14.3.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

ddapi-0.14.3-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

Details for the file ddapi-0.14.3.tar.gz.

File metadata

  • Download URL: ddapi-0.14.3.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for ddapi-0.14.3.tar.gz
Algorithm Hash digest
SHA256 e760e31dd6637c6ce6dc01e6b66b65e89aca49945a12a96394c6bc317bf7bbfc
MD5 4d742d5a11c34bf5d367033fcd61801d
BLAKE2b-256 be291f3834ab751c56ef3a7fb4369be3f302de66a4e2ac6d944835ee2a6d4a21

See more details on using hashes here.

File details

Details for the file ddapi-0.14.3-py3-none-any.whl.

File metadata

  • Download URL: ddapi-0.14.3-py3-none-any.whl
  • Upload date:
  • Size: 13.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for ddapi-0.14.3-py3-none-any.whl
Algorithm Hash digest
SHA256 30c5572219ce70b074ff56df6b99286f561e9cd254380d6d089639d6b325b67f
MD5 f88a8cecaf98cbb812eaa50fe4444a2f
BLAKE2b-256 e8712bec952995fdc83c4a8a4bf3a60616a2ae1abe841b6dccbbfc0939a45788

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page