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

Uploaded Source

Built Distribution

ddapi-0.12.1-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for ddapi-0.12.1.tar.gz
Algorithm Hash digest
SHA256 8d97d44612c8098ce55da3afe038e1f443ef9ac19635bb95a40b07504f1c262a
MD5 e58b5f7cf6258d3b8128a999496986e2
BLAKE2b-256 b39b5161fd8c4b42f2201bfdc8b13a426bbb790eeec975bec7a79b1e311c28eb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ddapi-0.12.1-py3-none-any.whl
  • Upload date:
  • Size: 10.0 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.12.1-py3-none-any.whl
Algorithm Hash digest
SHA256 258d641ce2ec26945b5da9659f7274d3b1e5156dcdf130fd19ae8b0640fa1a69
MD5 30ebab47fa7c9959c5f7b6d608597846
BLAKE2b-256 fdab48c563a9250bef5e24cbc3dcf0bb9a19ba6ff03959e41eb97b7301af5ad8

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