Skip to main content

DDnet api

Reason this release was yanked:

import bug

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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: ddapi-0.12.0.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.0.tar.gz
Algorithm Hash digest
SHA256 7cd5b82d7994504cd49c747fbfc39e38a1e1f2f11970c1a6ca2d0abc3c7c3cbd
MD5 840e62b65e3b22d881b3b21255cc7ab4
BLAKE2b-256 e613bb6887b1956dedc0ddb599261faf068c3c8eb9db8b4eb8b1158f028f3278

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ddapi-0.12.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b75e2d1b2432af937daaa51bd5b7f564074de4070b628f5f97b351497e1025b0
MD5 e585e398122aca3144756774626e76cf
BLAKE2b-256 9bb1938672c9f279b1370768f4146fe68b505ebfc9503b80f63dadf110e9155e

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