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

Uploaded Source

Built Distribution

ddapi-0.9.2-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for ddapi-0.9.2.tar.gz
Algorithm Hash digest
SHA256 0940abec1fe5fbb9f57232b56c17ad842d53e37fcf65435ced8569791365f714
MD5 9912689baa157fdaedcc8ed0584fa78e
BLAKE2b-256 ec723d61fb5a4e0d6e1fa4a339d71b8f3d47cb847fc2e699d98cc8acba15096e

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for ddapi-0.9.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5bebd0369a08fe71b65271432c689d658e585ed38e38c917491ca25805f25f56
MD5 92ecf6ae0e90db01a44626cb2db8bfd8
BLAKE2b-256 ec313d283ad53a5f35996a7ecbf59fa559360ab11673f55cca3dc1a06ab7a89b

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