async-mojang


Nameasync-mojang JSON
Version 1.0.4 PyPI version JSON
download
home_pagehttps://github.com/FroostySnoowman/Async-Mojang
SummaryAn async Python wrapper for the Mojang API.
upload_time2024-11-24 05:38:08
maintainerNone
docs_urlNone
authorFroostySnoowman
requires_python>=3.7
licenseMIT
keywords mojang minecraft api mojang api minecraft api async mojang async minecraft
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ```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_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)

    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/63/6b/37a56df6a8ffcec695667e26a5d22701c1e579cb8deea118d6ec1dcc3aba/async_mojang-1.0.4.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_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    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.4",
    "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": "dd5791462b4598889dea45573f8c8a793c22cd9f699b24a3ba11a8b30857398b",
                "md5": "d674f115aa7f361685e7eaab7081400b",
                "sha256": "7117fe4c60f600178dffb17835df41b641c92eea2ea3eddd906daa81cc45c517"
            },
            "downloads": -1,
            "filename": "async_mojang-1.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d674f115aa7f361685e7eaab7081400b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 7355,
            "upload_time": "2024-11-24T05:38:07",
            "upload_time_iso_8601": "2024-11-24T05:38:07.489921Z",
            "url": "https://files.pythonhosted.org/packages/dd/57/91462b4598889dea45573f8c8a793c22cd9f699b24a3ba11a8b30857398b/async_mojang-1.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "636b37a56df6a8ffcec695667e26a5d22701c1e579cb8deea118d6ec1dcc3aba",
                "md5": "5e9e9b95af0d2f7dac953c9d24c4d76b",
                "sha256": "9851b717044d8689caf65bd2216c1c1fe45c0ce2203094779376f5f6d10132ba"
            },
            "downloads": -1,
            "filename": "async_mojang-1.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "5e9e9b95af0d2f7dac953c9d24c4d76b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 6022,
            "upload_time": "2024-11-24T05:38:08",
            "upload_time_iso_8601": "2024-11-24T05:38:08.988130Z",
            "url": "https://files.pythonhosted.org/packages/63/6b/37a56df6a8ffcec695667e26a5d22701c1e579cb8deea118d6ec1dcc3aba/async_mojang-1.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-24 05:38:08",
    "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"
}
        
Elapsed time: 0.41939s