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.0.tar.gz
(13.1 kB
view hashes)
Built Distribution
Close
Hashes for minecraft-launcher-lib-3.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 295e478a352960cd549a4047aa192bdc39fe571d79b88764410799293fb8dfe7 |
|
MD5 | 5052f8921890b8fb54249976067e04b1 |
|
BLAKE2b-256 | 3056134c826857666f41e045d88005b98f914168f9f94f2924429ba5a247c365 |
Close
Hashes for minecraft_launcher_lib-3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d23471520fbcc4ccb19a2703d90742262bc2e82707d5cb4e7a1742eea48eabf |
|
MD5 | df0b108ff5be4555930492a3c0a030cd |
|
BLAKE2b-256 | ef4e6eba12b231c6608487e6f7e25996366d302b9e1d8b33af872bcf9aa5ed7a |