Skip to main content

To help to develop something about mk8dx

Project description

mk8dx

This library has Mogi, Race, Track, and Cup classes. And mk8dx.lounge_api is fully lounge api wrapper.

install

pip install mk8dx

sample

Track

from mk8dx import Track

mks = Track.from_nick('マリカス') # => Track.MKS
dcl = Track.from_nick('dcl') # => Track.DCL

print(mks.abbr)         # MKS
print(mks.name)         # Mario Kart Stadium
print(mks.full_name)    # Mario Kart Stadium
print(dcl.abbr_ja)      # チーズ
print(dcl.name_ja)      # チーズランド
print(dcl.full_name_ja) # GBA チーズランド

lounge_api

from mk8dx import lounge_api

async def getMaxScore(name: str, season: int) -> Optional[int]:
    player = await lounge_api.get_player_details(name=name, season=season)
    max_score = -1
    for mmr_change in player.mmr_changes:
        if mmr_change.score is not None and max_score < mmr_change.score:
            max_score = mmr_change.score
    if max_score == -1:
        return None
    return max_score

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

mk8dx-1.2.2-py3-none-any.whl (21.9 kB view details)

Uploaded Python 3

File details

Details for the file mk8dx-1.2.2-py3-none-any.whl.

File metadata

  • Download URL: mk8dx-1.2.2-py3-none-any.whl
  • Upload date:
  • Size: 21.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for mk8dx-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5e26e75a8507f4f0ddda06f19771256283e25dace8f622d46fcb9b96fbef1545
MD5 2b6035254d50cb42a534837d96f63f2e
BLAKE2b-256 38b7c14e7ec0dca66b746ff1046d260d133b614442bb1abe09daa58c5a58a3df

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