A simple Python lib to get player info and texture from Mojang and Yggdrasil APIs.
Project description
yggdrasil-mc
A simple Python lib to get player info and texture from Mojang and Yggdrasil APIs.
一个简单的 Python 库,可从 Mojang 和 Yggdrasil APIs 获取玩家的信息和材质。
Attention
This package can run in Python 3.10+ ONLY.
Usage
-
Download the package from PyPI
pip3 install -U yggdrasil-mc
-
from yggdrasil_mc import YggPlayerUuid, YggPlayerProfile player_name = "w84" player = YggPlayerUuid().getMojang(player_name) if player.existed: print(YggPlayerProfile().getMojang(player.id))
After you run these snippet, you will get the following output:
id='ca244462f8e5494791ec98f0ccf505ac' name='w84' properties=Properties(...
Note that this package also provide the asyncio version which is powered by aiohttp:
from yggdrasil_mc import YggPlayerUuid, YggPlayerProfile
player_name = "w84"
player = await YggPlayerUuid().getMojangAsync(player_name)
if player.existed:
print(await YggPlayerProfile().getMojangAsync(player.id))
Project details
Release history Release notifications | RSS feed
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.1b5.tar.gz
(16.4 kB
view hashes)
Built Distribution
Close
Hashes for yggdrasil_mc-0.1b5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7244b62a249f53db88ee3cf0e7a95abfbd5aefb6735d8d930d0ae2da96291b87 |
|
MD5 | eb88c6eb07690bb6229c692003ecb89a |
|
BLAKE2b-256 | 196f94c6a85dd43580520bd9ae603928c682156e2677c46918fe9382c0d0daf0 |