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():
    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())

Tested on Python

3.9 3.10 3.11 3.12
? ?

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

Uploaded Source

Built Distribution

ddapi-0.8.1-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ddapi-0.8.1.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.6

File hashes

Hashes for ddapi-0.8.1.tar.gz
Algorithm Hash digest
SHA256 a874b7a8a4a66f78db5a6a17d72acea10ee4bbbe34ae64b1875a4c2f8f5e429e
MD5 a6e3d84eb805ed4c519d5dd2f9954613
BLAKE2b-256 0d37f37326de547bfab4ecd4fd2a829e9effcfef697d25386676b19eb35c0232

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ddapi-0.8.1-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.6

File hashes

Hashes for ddapi-0.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 77d9046ec0d6d05be2d38bfb65015d4a906d7becb6a089e1d42b8cadd21f1078
MD5 78280bac9a200ee763bd786864669a6c
BLAKE2b-256 01ed4d4cc88b8edf763cd05e051bb91586b5a9977d213f8a2de10bf1d591b291

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