Skip to main content

ddapi

Project description

ddapi is an api from the ddnet and qwik website

Installation

  pip install 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())

qwik

import asyncio
from ddapi import Player, QwikAPI


async def main():
    obj = QwikAPI()
    nickname = "ByFox"
    user = 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, Player)


asyncio.run(main())

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

Uploaded Source

Built Distribution

ddapi-0.1.1-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ddapi-0.1.1.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for ddapi-0.1.1.tar.gz
Algorithm Hash digest
SHA256 89e1c10b323c1fed05dd5ab5dbd097470f4d49731408db37c183710574f659fa
MD5 755c033ad6d0e50d556b95b07e4a7b08
BLAKE2b-256 bbcfd05abb32aed960df5c43deefcc6fec5ebe068e79445d7e3c21a80f883021

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ddapi-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for ddapi-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1000751977a8969479e6eaaae13385d3a84ba509049c6479014bbd35466ee48a
MD5 bfae99f83dc9bd86a2c851b2c13e2029
BLAKE2b-256 6ced8c95d7727178186044d7d86693f935790cb57de6b84093c275271afd689c

See more details on using hashes here.

Supported by

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