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.5.tar.gz
(16.4 kB
view hashes)
Built Distribution
Close
Hashes for minecraft-launcher-lib-3.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82790339d9d1917bb3b2c28470b37f01152c10650b3f2ee1972e98fbba9f9414 |
|
MD5 | 0a5952a922b80f0fe04a7ba2869baf6e |
|
BLAKE2b-256 | 23f9d44f2829376a23b202f4e8c49f7456696d653b280353435059d27f02bbf7 |
Close
Hashes for minecraft_launcher_lib-3.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd365237e1a5be5c60b0ea9242f862237625d639943b3c0c5774b4a89daf706e |
|
MD5 | 47d8d082d19315cfe31dc3fa505dd165 |
|
BLAKE2b-256 | 0b7ee8b9eafb64e5ca1d7a7f4fc87b6e7420a941bfd6bbbf849f7f0bcec416b5 |