Skip to main content

Async-Mojang is a Python package for accessing Mojang's services. This library can be used to convert UUIDs, get a profile's information, change your Minecraft username or skin, and much more.

There is one component to this package:

  • Public API - Used to parse information about Minecraft profiles and more. Authentication is not required.

Installation

Python 3.7 or higher is required.

The easiest way to install the library is using pip. Just run the following console command:

pip install async-mojang

Public API Quickstart

import asyncio
from async_mojang import API

async def get_uuid(username: str):
    async with API() as api:
        uuid = await api.get_uuid(username)
        return uuid

async def get_stripped_uuid(username: str):
    async with API() as api:
        stripped_uuid = await api.get_stripped_uuid(username)
        return stripped_uuid

async def get_username(uuid: str):
    async with API() as api:
        username = await api.get_username(uuid)
        return username

async def get_profile(uuid: str):
    async with API() as api:
        profile = await api.get_profile(uuid)
        return profile

async def get_blocked_servers():
    async with API() as api:
        blocked_servers = await api.get_blocked_servers()
        return blocked_servers

async def main():
    uuid = await get_uuid("FroostySnoowman")
    print(uuid)

    stripped_uuid = await get_stripped_uuid("FroostySnoowman")
    print(stripped_uuid)

    username = await get_username(uuid)
    print(username)

    profile = await get_profile(uuid)
    print(profile)

    blocked_servers = await get_blocked_servers()
    print(blocked_servers)

if __name__ == "__main__":
    asyncio.run(main())

Metadata

Release files for async-mojang 1.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for async-mojang 1.0.5
File Size Uploaded
async_mojang-1.0.5.tar.gz 6.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for async-mojang 1.0.5
File Interpreter ABI Platform
async_mojang-1.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 13.4 kB

Release files / async_mojang-1.0.5.tar.gz

Download URL async_mojang-1.0.5.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
ae518fb57a48111b2731570658d5ddb8bc40c456ba2c4f89c228a0ec781d42c0
BLAKE2b-256 checksum
How to use checksums
2aaa102f01c11c7fa78871675a871d438c36ec5c223a134e50ddc5c256c88fe2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.8

Release files / async_mojang-1.0.5-py3-none-any.whl

Download URL async_mojang-1.0.5-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7c3f97f856fc91cf6fed6f022c6bd68329b65e747b69dc9d374dc9991b7748dd
BLAKE2b-256 checksum
How to use checksums
c2be2050aaa6c7819195f7caffc8fd2a4451398af7abf270f2d6ee0a506ecc38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.8

Release history Release notifications | RSS feed

This release

1.0.5 This release

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page