```Async-Mojang``` is a Python package for accessing Mojang's services. This library can be used to convert UUIDs, get a profile's information, change your Minecraft username or skin, and much more.
There is one component to this package:
- **Public API** - Used to parse information about Minecraft profiles and more. Authentication is not required.
## Installation
**Python 3.7 or higher is required.**
The easiest way to install the library is using `pip`. Just run the following console command:
```
pip install async-mojang
```
## **Public API Quickstart**
```py
import asyncio
from async_mojang import API
async def get_uuid(username: str):
async with API() as api:
uuid = await api.get_uuid(username)
return uuid
async def get_formatted_uuid(username: str):
async with API() as api:
formatted_uuid = await api.get_formatted_uuid(username)
return formatted_uuid
async def get_stripped_uuid(username: str):
async with API() as api:
stripped_uuid = await api.get_stripped_uuid(username)
return stripped_uuid
async def get_username(uuid: str):
async with API() as api:
username = await api.get_username(uuid)
return username
async def get_profile(uuid: str):
async with API() as api:
profile = await api.get_profile(uuid)
return profile
async def get_blocked_servers():
async with API() as api:
blocked_servers = await api.get_blocked_servers()
return blocked_servers
async def main():
uuid = await get_uuid("FroostySnoowman")
print(uuid)
formatted_uuid = await get_formatted_uuid("FroostySnoowman")
print(formatted_uuid)
stripped_uuid = await get_stripped_uuid("FroostySnoowman")
print(stripped_uuid)
username = await get_username(uuid)
print(username)
profile = await get_profile(uuid)
print(profile)
blocked_servers = await get_blocked_servers()
print(blocked_servers)
if __name__ == "__main__":
asyncio.run(main())
```
Raw data
{
"_id": null,
"home_page": "https://github.com/FroostySnoowman/Async-Mojang",
"name": "async-mojang",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "mojang, minecraft, api, mojang api, minecraft api, async mojang, async minecraft",
"author": "FroostySnoowman",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/08/aa/9b2eb51590dfc48f16106abbab3cc1c97eeeb97b168b91ea1dca5f7708d8/async_mojang-1.0.3.tar.gz",
"platform": null,
"description": "```Async-Mojang``` is a Python package for accessing Mojang's services. This library can be used to convert UUIDs, get a profile's information, change your Minecraft username or skin, and much more. \n\nThere is one component to this package:\n\n- **Public API** - Used to parse information about Minecraft profiles and more. Authentication is not required.\n\n## Installation\n**Python 3.7 or higher is required.**\n\nThe easiest way to install the library is using `pip`. Just run the following console command:\n\n```\npip install async-mojang\n```\n\n## **Public API Quickstart**\n```py\nimport asyncio\nfrom async_mojang import API\n\nasync def get_uuid(username: str):\n async with API() as api:\n uuid = await api.get_uuid(username)\n return uuid\n\nasync def get_formatted_uuid(username: str):\n async with API() as api:\n formatted_uuid = await api.get_formatted_uuid(username)\n return formatted_uuid\n\nasync def get_stripped_uuid(username: str):\n async with API() as api:\n stripped_uuid = await api.get_stripped_uuid(username)\n return stripped_uuid\n\nasync def get_username(uuid: str):\n async with API() as api:\n username = await api.get_username(uuid)\n return username\n\nasync def get_profile(uuid: str):\n async with API() as api:\n profile = await api.get_profile(uuid)\n return profile\n\nasync def get_blocked_servers():\n async with API() as api:\n blocked_servers = await api.get_blocked_servers()\n return blocked_servers\n\nasync def main():\n uuid = await get_uuid(\"FroostySnoowman\")\n print(uuid)\n\n formatted_uuid = await get_formatted_uuid(\"FroostySnoowman\")\n print(formatted_uuid)\n\n stripped_uuid = await get_stripped_uuid(\"FroostySnoowman\")\n print(stripped_uuid)\n\n username = await get_username(uuid)\n print(username)\n\n profile = await get_profile(uuid)\n print(profile)\n\n blocked_servers = await get_blocked_servers()\n print(blocked_servers)\n\nif __name__ == \"__main__\":\n asyncio.run(main())\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "An async Python wrapper for the Mojang API.",
"version": "1.0.3",
"project_urls": {
"Homepage": "https://github.com/FroostySnoowman/Async-Mojang"
},
"split_keywords": [
"mojang",
" minecraft",
" api",
" mojang api",
" minecraft api",
" async mojang",
" async minecraft"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b0c715fc33ea3a124c7ee5c265eea290daa7dd7cfa5f92066120e20739e95e62",
"md5": "35734dc6ee03f0c57d9d4cc67abefc90",
"sha256": "f807df4a05bcfec59274f6c94fb73fa1a1565a4ef01d5e739ccefaf5d3a19dc3"
},
"downloads": -1,
"filename": "async_mojang-1.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "35734dc6ee03f0c57d9d4cc67abefc90",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 7403,
"upload_time": "2024-10-04T21:49:17",
"upload_time_iso_8601": "2024-10-04T21:49:17.641787Z",
"url": "https://files.pythonhosted.org/packages/b0/c7/15fc33ea3a124c7ee5c265eea290daa7dd7cfa5f92066120e20739e95e62/async_mojang-1.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "08aa9b2eb51590dfc48f16106abbab3cc1c97eeeb97b168b91ea1dca5f7708d8",
"md5": "cb48828ae251248a0dec93af04947dad",
"sha256": "3aa9692e61d1c3ea489a13c3aabd22eaebfb907df28419ec2fc1acb080c43eaf"
},
"downloads": -1,
"filename": "async_mojang-1.0.3.tar.gz",
"has_sig": false,
"md5_digest": "cb48828ae251248a0dec93af04947dad",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 6440,
"upload_time": "2024-10-04T21:49:18",
"upload_time_iso_8601": "2024-10-04T21:49:18.572458Z",
"url": "https://files.pythonhosted.org/packages/08/aa/9b2eb51590dfc48f16106abbab3cc1c97eeeb97b168b91ea1dca5f7708d8/async_mojang-1.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-04 21:49:18",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "FroostySnoowman",
"github_project": "Async-Mojang",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "async-mojang"
}