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.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e808a2c593daf42f443934bceddcfde7dfe2496cc2b29c24bdde3d267219adc3 |
|
MD5 | ddc4f71ce70acb9d8f02e44c002eab2d |
|
BLAKE2b-256 | 775be8260b0ebd252c05a9bd679b41d3dd1a225875923e82e75dd01bf1bccec3 |
Close
Hashes for minecraft_launcher_lib-1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68c9fd794d936765fc6785c1b39064dfe56418c4a35267a5b4fbf6ce59dbeb67 |
|
MD5 | 9f11c3aed05633a16ae3d357259f0b91 |
|
BLAKE2b-256 | 8d2d8955affdc4faee3fcf9ac0678ac29273c55011271b49513cd3be4a834e66 |