Skip to main content

A simple Python lib to get player info and texture from Mojang and Blessing Skin.

Project description

yggdrasil-mc

GitHub Repo stars PyPI PyPI - Python Version GitHub last commit (branch) GitHub

A simple Python lib to get player info and texture from Mojang and Blessing Skin.

一个简单的 Python 库,可从 Mojang 和 Blessing Skin 获取玩家的信息和材质。

Attention

This package can run in Python 3.10+ ONLY.

Usage

  1. Download the package from PyPI

    pip3 install -U yggdrasil-mc
    
  2. from yggdrasil_mc.ygg import YggdrasilPlayerUuidApi
    
    player_name = "w84"
    player = YggdrasilPlayerUuidApi.getMojangServer(player_name)
    if player.existed:
        print(player.id)
    

After you run these snippet, you will get the following output:

ca244462f8e5494791ec98f0ccf505ac

Note that this package also provide the asyncio version which is powered by aiohttp:

from yggdrasil_mc.ygg_async import YggdrasilPlayerUuidApi

player_name = "w84"

async get_player_uuid(player_name: str = player_name)
    player = await YggdrasilPlayerUuidApi.getMojangServer(player_name)
    return player.id

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

yggdrasil_mc-0.1b3.tar.gz (16.1 kB view hashes)

Uploaded Source

Built Distribution

yggdrasil_mc-0.1b3-py3-none-any.whl (16.4 kB view hashes)

Uploaded Python 3

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