A library for creating a custom Minecraft launcher
Project description
minecraft-launcher-lib
A Python library for creating a custom minecraft launcher. This library containts functions to install and execute minecraft and interacting with mojang accounts.
import minecraft_launcher_lib
import subprocess
#Get latest version
latest_version = minecraft_launcher_lib.utils.get_latest_version()["release"]
#Get Minecraft directory
minecraft_directory = minecraft_launcher_lib.utils.get_minecraft_directory()
#Make sure, the latest version of Minecraft is installed
minecraft_launcher_lib.install.install_minecraft_version(latest_version,minecraft_directory)
#Login
login_data = minecraft_launcher_lib.account.login_user("JohnDoe","secret")
#Get Minecraft command
options = {
"username": login_data["selectedProfile"]["name"],
"uuid": login_data["selectedProfile"]["id"],
"token": login_data["accessToken"]
}
minecraft_command = minecraft_launcher_lib.command.get_minecraft_command(latest_version,minecraft_directory,options)
#Start Minecraft
subprocess.call(minecraft_command)
Features:
- Easy installing
- Get command to run Minecraft
- Login to Mojang account
- Support Forge, Fabric and Liteloader
- Old versions like alpha or beta supported
- All functions have type annotations and docstrings
- Full Documention online available
- Examples available
- OpenSource
Thanks to tomsik68 who documented how a minecraft launcher works
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
minecraft-launcher-lib-3.6.tar.gz
(16.6 kB
view hashes)
Built Distribution
Close
Hashes for minecraft-launcher-lib-3.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1bd0a0320d26f66414512111a561912d35c5d9d9a9c0fc5ceca7c6f9aa54029a |
|
MD5 | 19ee51faaaa3914f8bacdcc368448686 |
|
BLAKE2b-256 | d54685033d8b991187e1df3f034f105a96ac77e34fe38bb9c88863a50e8fa04b |
Close
Hashes for minecraft_launcher_lib-3.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc6be47c2a7e1e5bf19c83772b8a17a87ee7cb0240ea7ca2a22910c321990cbe |
|
MD5 | 7624b8980f082e9f3cfced2d22cd0126 |
|
BLAKE2b-256 | 2157d2a6795404ed1efba8b8f648d71c921bafd753050663f0202d9329de8fc2 |