Skip to main content

Simple data parser from ddnet sites

Project description

Simple parser of data from DDNet Master Servers and DDStats

This parser makes it easy to get data from ddnet master servers and various statistics from ddstats.tw.

Installation:

Installing the library:

pip install requests

Installing the latest stable version of the parser:

pip install ddnet-parser

Installing test and unstable version of the parser:

pip install git+https://github.com/neyxezz/ddnet-parser@tests

GetClients(address=None, data=None)

  • Gets an object for parsing client information
  • Documentation: 🙂
  • Args: address(bool, optional): address of the server for which to get client information; data(dict or str, optional): data from which the information will be parsed

Example:

from ddnet_parser import GetClients

clients = GetClients()
print(clients.get_clients(count=True))

GetServers(address=None, data=None)

  • Gets an object for parsing server information
  • Documentation: 🙂
  • Args: address(bool, optional): address of the server to get information for; data(dict or str, optional): data from which the information will be parsed

Example:

from ddnet_parser import GetServers

servers = GetServers()
print(servers.get_count())

GetPlayerStats(name)

  • Gets an object for parsing player stats
  • Documentation: 🙂
  • Args: name(str): the nickname for which you want to get stats

Example:

from ddnet_parser import GetPlayerStats

player = GetPlayerStats("neyxezz")
print(player.get_total_seconds_played())

GetMap(_map)

  • Gets an object for parsing map data
  • Documentation: 🙂
  • Args: address(str): the map to get data for

Example:

from ddnet_parser import GetMap

map = GetMap("Linear")
print(map.get_mapper())

GetProfile(name)

  • Gets an object for parsing a player's profile
  • Documentation: 🙂
  • Args: name(str): the nickname to get the profile for

Example:

from ddnet_parser import GetProfile

profile = GetProfile()
print(profile.get_points())

Detailed documentation with examples:

  • Detailed documentation: 🙂
  • Examples: 🙂

Contact me

tg main: @neyxezz, tg twink: @neyxezz_twink

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

ddnet_parser-1.2.0.tar.gz (6.9 kB view details)

Uploaded Source

File details

Details for the file ddnet_parser-1.2.0.tar.gz.

File metadata

  • Download URL: ddnet_parser-1.2.0.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for ddnet_parser-1.2.0.tar.gz
Algorithm Hash digest
SHA256 eb2c5865b49753422e3a68783665029e824874702651ff0db75b9aae1e29d14a
MD5 c4898ff59c1aa905d457df453fa258f8
BLAKE2b-256 046be363497f0a220ae1576ad99bdf4f7ebae645ad5ffe27b7fc962a217b7498

See more details on using hashes here.

Supported by

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