PyMojang python module



PyMojang is an open-source Python library that serves as a wrapper for the Mojang API. It simplifies the use of Mojang's APIs and helps developers integrate Minecraft-related functionalities into their own applications or websites.

With PyMojang, developers can easily access player data, authenticate users, manage product vouchers, and perform various actions related to Minecraft accounts. The library follows semantic versioning and is actively maintained, with future updates planned to include methods for wrapping the Realms API.


The core objective of PyMojang is to offer developers an effective interface for seamless interaction with the Mojang API . It strives to simplify the integration of Mojang's APIs into applications and websites by removing the burden of working directly with the actual APIs.

Furthermore, I personally saw an opportunity to learn more about Python development and gain valuable insights into the process of packaging, publishing and creating a software package.


The challenges depend on the API: if the API is well structured then the process is obviously easier. In this case, the complexity did not come from the APIs itself but by the fact that there are multiple APIs that work together which present multiple challenges, including understanding and properly handling all the APIs. This involved authentication, rate limits, errors-response and future-proofing the library for potential API updates.

My role

It's hard for me to determine which role I played in the making of this package. I practically designed from scratch, does that make me a Software Architect ? I also implemented core features, prioritised robustness, and ensured high-quality code, that makes a Software Developer I guess ? (A good one I hope). Anyway this multifaceted role allowed me to gain expertise in Python package development and in maintaining an open-source project.


  • Simplified access to player data: Retrieve player information, including usernames, UUIDs, skins and capes.
  • User authentication: Authenticate Minecraft accounts using Microsoft.
  • Product voucher management: Check the availability and redeem product vouchers associated with Minecraft accounts.
  • Username availability: Verify the availability of usernames for account registration or change.
  • Realms API integration (planned): Access and manage Minecraft Realms functionality within your applications.


Much of the knowledge I acquired about the APIs was sourced from wiki.vg, a website which contains comprehensive information on Mojang's APIs and more. It's backed by an incredible community and is still maintained up to this day.

As previously mentioned, I decided to utilise this project as an opportunity to gain experience in publishing and managing a Python package. While numerous online resources offer guidance in this area, none have proven as invaluable as the packaging guide provided by the official Python documentation.