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.2.tar.gz
(13.1 kB
view hashes)
Built Distribution
Close
Hashes for minecraft-launcher-lib-3.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | de5f2273b360248de3d55a9eb64dda62e4a7ab9e2949205a9e3ac102c34305aa |
|
MD5 | f174a7bd8c1ea7bfc8142c90c036633c |
|
BLAKE2b-256 | 92919f65a14682d22dc0ad422a40ec1e7e4d719ab04e2e7a4663ed21dbbbdb6c |
Close
Hashes for minecraft_launcher_lib-3.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e08be764434fc57e91a74404477510d9964c948c0a521ff8bd46c723008cb746 |
|
MD5 | b13930a1b057024df676c7c9c9befed7 |
|
BLAKE2b-256 | b7722d3b25accb67db9a932b6bc7c711bf9e114c567b1885912e816cdf7947fd |