Skip to main content

A high-level Python3 wrapper module for the Counter-Strike: 2 Premier Leaderboards API.

Project description

cs2APY

Counter-Strike 2 Premier Leaderboard API Module & Raw API in Python3.

Installation

pip install CS2APY

Example Use:

import CS2APY as cs2

# w/o manual class instantiation, fetches all leaderboards
all = cs2.fetch_all()

# w/ instantiation, fetches all leaderboards
_instance = cs2.CS2APY()
_all = _instance.fetch_all()

Methods:

fetch_all(): fetches all the regions' leaderboards and returns them as an array of dicts

fetch_global(): fetches the leaderboard for Global rankings and returns them as an array of dicts

fetch_europe(): fetches the leaderboard for European rankings and returns them as an array of dicts

fetch_africa(): fetches the leaderboard for African rankings and returns them as an array of dicts

fetch_asia(): fetches the leaderboard for Asian rankings and returns them as an array of dicts

fetch_australia(): fetches the leaderboard for Australian rankings and returns them as an array of dicts

fetch_china(): fetches the leaderboard for Chinese rankings and returns them as an array of dicts

fetch_northamerica(): fetches the leaderboard for NA rankings and returns them as an array of dicts

fetch_southamerica(): fetches the leaderboard for SA rankings and returns them as an array of dicts

Example Output:

import CS2APY as cs2

africa = cs2.fetch_africa()
print(africa)

# Output
# [
#     {
#         "rank": 1,
#         "rating": 22117,
#         "name": "splitsecond kirito",
#         "matches_won": 163,
#         "matches_tied": null,
#         "matches_lost": 21,
#         "map_stats": {
#             "anubis": 2,
#             "inferno": 1,
#             "mirage": 6,
#             "vertigo": 0,
#             "overpass": 0,
#             "nuke": 0,
#             "ancient": 1,
#             "null": 0
#         },
#         "time_achieved": "2023-10-10T19:40:08",
#         "region": "africa"
#     },
#     ...
#  ]

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

CS2APY-0.5.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

CS2APY-0.5-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file CS2APY-0.5.tar.gz.

File metadata

  • Download URL: CS2APY-0.5.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.2

File hashes

Hashes for CS2APY-0.5.tar.gz
Algorithm Hash digest
SHA256 6f139dd0b7c273dde74038fcfb31ac2e39dcd03a327da81032e0623be33fd507
MD5 5e0cf196e00db140c8ea023ea616fb7b
BLAKE2b-256 1a571da0b7770708273b871545040993e5b1ddc8c1da8914cf8c70996a3928b4

See more details on using hashes here.

File details

Details for the file CS2APY-0.5-py3-none-any.whl.

File metadata

  • Download URL: CS2APY-0.5-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.2

File hashes

Hashes for CS2APY-0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d960f36c2049ee2bb3cc26f81ef7e30572ef73a7ddc756517037a2054e86e165
MD5 093665a047ba745107def5ef7c8155c9
BLAKE2b-256 c1dc64b2cd5d62da79a70b60d4af60557a9c7d78d8a1794dc1b9bdaa0906a024

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