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
get_clients(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 get_clients
clients = get_clients()
print(clients.get_clients(count=True))
get_servers(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 get_servers
servers = get_servers()
print(servers.get_count())
get_player_stats(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 get_player_stats
player = get_player_stats("neyxezz")
print(player.get_total_seconds_played())
get_map(_map)
- Gets an object for parsing map data
- Documentation: 🙂
- Args: address(str): the map to get data for
Example:
from ddnet_parser import get_map
map = get_map("Linear")
print(map.get_mapper())
get_profile(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 get_profile
profile = get_profile()
print(profile.get_points())
Detailed documentation with 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.3.0.tar.gz
(6.9 kB
view details)
File details
Details for the file ddnet_parser-1.3.0.tar.gz.
File metadata
- Download URL: ddnet_parser-1.3.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79bbc0b43c9dae694f04cbac0a084dcebf13f0a6db828e3573d3d1daa63d5782
|
|
| MD5 |
6b014c1bb3d7e5ca4d99bece77d1ecd7
|
|
| BLAKE2b-256 |
ba449a4ed6e146e94c0f0157ff1a6d91a8e902414ee912a9a9cf4adecb3c9265
|