# 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/3a/b8/da3f82fa9e8fe1a728f40c2e57c181d27c5dc6cc823dac4e38326fd6f789/async_mc_launcher_core-0.4.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.4",
"project_urls": {
"Issues": "https://github.com/JaydenChao101/async-mc-launcher-core/issues",
"Source": "https://github.com/JaydenChao101/async-mc-launcher-core"
},
"split_keywords": [
"minecraft",
" mojang",
" launcher",
" minecraft-launcher",
" java",
" async"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "bcc1c7335274b89bd0a6c5e0d823735e891e33ac57463727e69bf5308358117d",
"md5": "96c2f9e130f6dcd3636e52406d2727c2",
"sha256": "fadf3a04671ea9c2c750146815fdfa0edae974a8e27de6526c346f93dad7d104"
},
"downloads": -1,
"filename": "async_mc_launcher_core-0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "96c2f9e130f6dcd3636e52406d2727c2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 78669,
"upload_time": "2025-07-16T06:46:27",
"upload_time_iso_8601": "2025-07-16T06:46:27.629882Z",
"url": "https://files.pythonhosted.org/packages/bc/c1/c7335274b89bd0a6c5e0d823735e891e33ac57463727e69bf5308358117d/async_mc_launcher_core-0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "3ab8da3f82fa9e8fe1a728f40c2e57c181d27c5dc6cc823dac4e38326fd6f789",
"md5": "ae567203600967a6c5e18fa45f4998de",
"sha256": "49c94f112d205e33eb2f2320b89ac5aafb424cbc1143da4db341a15f458aded3"
},
"downloads": -1,
"filename": "async_mc_launcher_core-0.4.tar.gz",
"has_sig": false,
"md5_digest": "ae567203600967a6c5e18fa45f4998de",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 65952,
"upload_time": "2025-07-16T06:46:28",
"upload_time_iso_8601": "2025-07-16T06:46:28.933669Z",
"url": "https://files.pythonhosted.org/packages/3a/b8/da3f82fa9e8fe1a728f40c2e57c181d27c5dc6cc823dac4e38326fd6f789/async_mc_launcher_core-0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-16 06:46:28",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "JaydenChao101",
"github_project": "async-mc-launcher-core",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "async-mc-launcher-core"
}