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
- Forge supported
- Old versions like alpha or beta supported
- Documention aviable
- 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
Built Distribution
Close
Hashes for minecraft-launcher-lib-1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d4de5a44ee6ac985ff46fe7ddfec8f6e3b1fa7e8cd04c556c7f827bbc3684ea |
|
MD5 | b903f767e4c2c4ecf35640b534d814cc |
|
BLAKE2b-256 | 89b1744c1ac1d26ab076149884f87339240c8aedc690a0164f015bd7581d4a7a |
Close
Hashes for minecraft_launcher_lib-1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01041e79db5320017309489d35ed0d828c49872fc920bae8fbb1229692bada4d |
|
MD5 | cd79c5b42391fad9e5ed68fe5bde7f5e |
|
BLAKE2b-256 | 974be2af0b9b5ee185d99123bdf9ec8e8d3be5078cafb15433221781a8f360cc |