# Async MC Launcher Core π
**A modern async Python library for custom Minecraft launchers**
> [δΈζθͺͺζθ«θ¦ README-Chinese.md](./README-Chinese.md)
[](https://github.com/JaydenChao101/asyncio-mc-launcher-lib/actions/workflows/test.yml)
[](https://github.com/JaydenChao101/asyncio-mc-launcher-lib/actions/workflows/uv_build.yaml)
[](https://deepwiki.com/JaydenChao101/async-mc-launcher-core)
> This project is a fork of [JakobDev/minecraft-launcher-lib](https://codeberg.org/JakobDev/minecraft-launcher-lib).
A Python library for building custom Minecraft launchers. Supports installing, launching Minecraft, and interacting with Mojang/Microsoft accounts.
## Features
- Easy installation
- Generate Minecraft launch commands
- Microsoft account login support
- Supports [Forge](https://minecraftforge.net), [Fabric](https://fabricmc.net), [Quilt](https://quiltmc.org), and Liteloader
- Supports alpha/beta and legacy versions
- All functions are type-annotated and documented
- [PyPy](https://www.pypy.org) support
- Full online documentation and tutorials
- Vanilla launcher profiles read/write support
- [mrpack modpacks](https://docs.modrinth.com/docs/modpacks/format_definition) support
- All public APIs are statically typed
- Rich examples
- Open source
## Installation
Install via pip:
```bash
pip install async-mc-launcher-core
```
Or with uv (faster install):
```bash
uv pip install async-mc-launcher-core
```
## Microsoft Account Login Example
```python
import logging
from launcher_core import microsoft_account
import asyncio
from launcher_core.setting import setup_logger
from launcher_core.mojang import have_minecraft
logger = setup_logger(enable_console=False, level=logging.INFO, filename="microsoft_account.log")
async def login_microsoft_account():
AZURE_APP = microsoft_account.AzureApplication()
Login = microsoft_account.Login(azure_app=AZURE_APP)
login_url = await Login.get_login_url()
print(f"Please open {login_url} in your browser and copy the URL you are redirected into the prompt below.")
code_url = input()
code = await microsoft_account.Login.extract_code_from_url(code_url)
auth_code = await Login.get_ms_token(code)
print(f"Refresh token: {auth_code['refresh_token']}")
xbl_token = await microsoft_account.Login.get_xbl_token(auth_code["access_token"])
xsts_token = await microsoft_account.Login.get_xsts_token(xbl_token["Token"])
uhs = xbl_token["DisplayClaims"]["xui"][0]["uhs"]
mc_token = await microsoft_account.Login.get_minecraft_access_token(xsts_token["Token"], uhs)
await have_minecraft(mc_token["access_token"])
login_data = {
"access_token": mc_token["access_token"],
"refresh_token": auth_code["refresh_token"],
"expires_in": auth_code["expires_in"],
"uhs": uhs,
"xsts_token": xsts_token["Token"],
"xbl_token": xbl_token["Token"]
}
return login_data["access_token"]
if __name__ == "__main__":
access_token = asyncio.run(login_microsoft_account())
print(f"Access token: {access_token}")
```
## Documentation & More Examples
- [Online Documentation](https://minecraft-launcher-lib.readthedocs.io)
- [More Examples](https://codeberg.org/JakobDev/minecraft-launcher-lib/src/branch/master/examples)
## Comparison: This Fork vs. [JakobDev/minecraft-launcher-lib](https://codeberg.org/JakobDev/minecraft-launcher-lib)
| Feature/Design | This Fork | JakobDev Original |
|-------------------------|-------------------------------------------------------|---------------------------------------------------|
| Python Version Support | 3.10+, more complete type annotations | 3.7+, partial type annotations |
| Logging System | Built-in `setup_logger`, file & console output | No built-in logging, user must implement |
| Microsoft Login Flow | Example & API fully async/await | All sync |
| Dependencies | aiofiles, aiohttp, requests, requests-mock | requests |
| Documentation | Primarily in Chinese, tailored for TW/Chinese users | English |
| Branch Strategy | main/dev auto-sync (GitHub Actions) | Single main branch |
| Others | Optimized for async/await and type annotations | Focus on broad compatibility |
> Please refer to both the original and this fork to choose the version that best fits your needs!
## Contributing
PRs and issues are welcome!
## Acknowledgements
Thanks to [tomsik68](https://github.com/tomsik68/mclauncher-api/wiki) for documenting Minecraft launcher internals.
Thanks to [JakobDev](https://github.com/JakobDev) for the original code (BSD-2).
Raw data
{
"_id": null,
"home_page": null,
"name": "async-mc-launcher-core",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "Minecraft, Mojang, launcher, minecraft-launcher, java, async",
"author": null,
"author_email": "JaydenChao101 <jaydenchao@proton.me>",
"download_url": "https://files.pythonhosted.org/packages/40/31/6a2091325c8621ffad620013964ee64619d156aa38a8ebaade0b9579b31b/async_mc_launcher_core-0.3.1.tar.gz",
"platform": null,
"description": "# Async MC Launcher Core \ud83d\ude80\n**A modern async Python library for custom Minecraft launchers**\n> [\u4e2d\u6587\u8aaa\u660e\u8acb\u898b README-Chinese.md](./README-Chinese.md)\n\n[](https://github.com/JaydenChao101/asyncio-mc-launcher-lib/actions/workflows/test.yml)\n[](https://github.com/JaydenChao101/asyncio-mc-launcher-lib/actions/workflows/uv_build.yaml)\n[](https://deepwiki.com/JaydenChao101/async-mc-launcher-core)\n\n> This project is a fork of [JakobDev/minecraft-launcher-lib](https://codeberg.org/JakobDev/minecraft-launcher-lib).\n\nA Python library for building custom Minecraft launchers. Supports installing, launching Minecraft, and interacting with Mojang/Microsoft accounts.\n\n## Features\n\n- Easy installation\n- Generate Minecraft launch commands\n- Microsoft account login support\n- Supports [Forge](https://minecraftforge.net), [Fabric](https://fabricmc.net), [Quilt](https://quiltmc.org), and Liteloader\n- Supports alpha/beta and legacy versions\n- All functions are type-annotated and documented\n- [PyPy](https://www.pypy.org) support\n- Full online documentation and tutorials\n- Vanilla launcher profiles read/write support\n- [mrpack modpacks](https://docs.modrinth.com/docs/modpacks/format_definition) support\n- All public APIs are statically typed\n- Rich examples\n- Open source\n\n## Installation\n\nInstall via pip:\n```bash\npip install async-mc-launcher-core\n```\n\nOr with uv (faster install):\n```bash\nuv pip install async-mc-launcher-core\n```\n\n## Microsoft Account Login Example\n\n```python\nimport logging\nfrom launcher_core import microsoft_account\nimport asyncio\nfrom launcher_core.setting import setup_logger\nfrom launcher_core.mojang import have_minecraft\n\nlogger = setup_logger(enable_console=False, level=logging.INFO, filename=\"microsoft_account.log\")\n\nasync def login_microsoft_account():\n AZURE_APP = microsoft_account.AzureApplication()\n Login = microsoft_account.Login(azure_app=AZURE_APP)\n login_url = await Login.get_login_url()\n print(f\"Please open {login_url} in your browser and copy the URL you are redirected into the prompt below.\")\n code_url = input()\n code = await microsoft_account.Login.extract_code_from_url(code_url)\n auth_code = await Login.get_ms_token(code)\n print(f\"Refresh token: {auth_code['refresh_token']}\")\n xbl_token = await microsoft_account.Login.get_xbl_token(auth_code[\"access_token\"])\n xsts_token = await microsoft_account.Login.get_xsts_token(xbl_token[\"Token\"])\n uhs = xbl_token[\"DisplayClaims\"][\"xui\"][0][\"uhs\"]\n mc_token = await microsoft_account.Login.get_minecraft_access_token(xsts_token[\"Token\"], uhs)\n await have_minecraft(mc_token[\"access_token\"])\n login_data = {\n \"access_token\": mc_token[\"access_token\"],\n \"refresh_token\": auth_code[\"refresh_token\"],\n \"expires_in\": auth_code[\"expires_in\"],\n \"uhs\": uhs,\n \"xsts_token\": xsts_token[\"Token\"],\n \"xbl_token\": xbl_token[\"Token\"]\n }\n return login_data[\"access_token\"]\n\nif __name__ == \"__main__\":\n access_token = asyncio.run(login_microsoft_account())\n print(f\"Access token: {access_token}\")\n```\n\n## Documentation & More Examples\n\n- [Online Documentation](https://minecraft-launcher-lib.readthedocs.io)\n- [More Examples](https://codeberg.org/JakobDev/minecraft-launcher-lib/src/branch/master/examples)\n\n## Comparison: This Fork vs. [JakobDev/minecraft-launcher-lib](https://codeberg.org/JakobDev/minecraft-launcher-lib)\n\n| Feature/Design | This Fork | JakobDev Original |\n|-------------------------|-------------------------------------------------------|---------------------------------------------------|\n| Python Version Support | 3.10+, more complete type annotations | 3.7+, partial type annotations |\n| Logging System | Built-in `setup_logger`, file & console output | No built-in logging, user must implement |\n| Microsoft Login Flow | Example & API fully async/await | All sync |\n| Dependencies | aiofiles, aiohttp, requests, requests-mock | requests |\n| Documentation | Primarily in Chinese, tailored for TW/Chinese users | English |\n| Branch Strategy | main/dev auto-sync (GitHub Actions) | Single main branch |\n| Others | Optimized for async/await and type annotations | Focus on broad compatibility |\n\n> Please refer to both the original and this fork to choose the version that best fits your needs!\n\n## Contributing\n\nPRs and issues are welcome!\n\n## Acknowledgements\n\nThanks to [tomsik68](https://github.com/tomsik68/mclauncher-api/wiki) for documenting Minecraft launcher internals.\n\nThanks to [JakobDev](https://github.com/JakobDev) for the original code (BSD-2).\n",
"bugtrack_url": null,
"license": null,
"summary": "A Modern Async Python Library for Minecraft Launcher Development",
"version": "0.3.1",
"project_urls": {
"Issues": "https://github.com/JaydenChao101/asyncio-mc-launcher-lib/issues",
"Source": "https://github.com/JaydenChao101/asyncio-mc-launcher-lib"
},
"split_keywords": [
"minecraft",
" mojang",
" launcher",
" minecraft-launcher",
" java",
" async"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "ed56b7f48a7560aa8c5f5a897a285139dfcda92911b12a43b33709c2b0ab94bf",
"md5": "5212022e10e599af62e9203ab5a1b567",
"sha256": "e9f696a3ea4eec616fcd6bd213ca7047d919395d1ddda11ee44bb3e04b5e4e12"
},
"downloads": -1,
"filename": "async_mc_launcher_core-0.3.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5212022e10e599af62e9203ab5a1b567",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 62232,
"upload_time": "2025-07-12T10:20:03",
"upload_time_iso_8601": "2025-07-12T10:20:03.528085Z",
"url": "https://files.pythonhosted.org/packages/ed/56/b7f48a7560aa8c5f5a897a285139dfcda92911b12a43b33709c2b0ab94bf/async_mc_launcher_core-0.3.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "40316a2091325c8621ffad620013964ee64619d156aa38a8ebaade0b9579b31b",
"md5": "1180f30ee2b3cd14399c46439b6e9b58",
"sha256": "fc62d05a48b5e32707a9304025a35f90e810b24fb6457c0efb327b002c757831"
},
"downloads": -1,
"filename": "async_mc_launcher_core-0.3.1.tar.gz",
"has_sig": false,
"md5_digest": "1180f30ee2b3cd14399c46439b6e9b58",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 54363,
"upload_time": "2025-07-12T10:20:04",
"upload_time_iso_8601": "2025-07-12T10:20:04.429013Z",
"url": "https://files.pythonhosted.org/packages/40/31/6a2091325c8621ffad620013964ee64619d156aa38a8ebaade0b9579b31b/async_mc_launcher_core-0.3.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-12 10:20:04",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "JaydenChao101",
"github_project": "asyncio-mc-launcher-lib",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "async-mc-launcher-core"
}