adofai


Nameadofai JSON
Version 0.1.0rc0 PyPI version JSON
download
home_pagehttps://github.com/Silverteal/adofai
SummaryShared data model for authlib-injector yggdrasil implementation and Minecraft API services
upload_time2024-10-06 11:47:34
maintainerNone
docs_urlNone
authorSilverteal
requires_python<4.0,>=3.12
licenseMIT
keywords minecraft mc authlib authlib-injector implementaion abc yggdrasil
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ADOFAI

*本项目和 A Dance Of Fire And Ice (中文名“冰与火之舞”)没有任何关系*

ADOFAI (Adjustable Data Objects For Authlib Injector) 是一组数据模型和配套工具,旨在简化自定义实现 Authlib-injector 的规范
Yggdrasil 服务端、客户端及其配套程序的过程。

Yggdrasil 是游戏 Minecraft 中身份验证服务的实现名称。

## 快速开始

### 安装

```shell
pip install adofai
```

### 示例

```python
from adofai import GameName, TextureUrl
from adofai.models import GameProfile, TextureProfile, TextureProperty
from adofai.utils.uuid import offline_uuid
from adofai.utils.signing import dummy_key

texture = TextureProfile(
    skin=TextureProperty(
        url=TextureUrl("https://something"),
        metadata={"model": "slim"}
    ),
    cape=TextureProperty(
        url=TextureUrl("https://yetanother")
    )
)

game_profile = GameProfile(
    name="Notch",
    id=offline_uuid(GameName("Notch")),
    texture=texture,
    extra_properties={"uploadableTextures": "skin,cape"}
)

print(game_profile.serialize("full", dummy_key()))

```

## 另请参阅

[Yggdrasil Scaffold](https://github.com/silverteal/yggdrasil-scaffold) 是基于 ADOFAI 和 FastAPI 的 Yggdrasil
身份验证协议实现脚手架。

[Yggdrasil Client](https://github.com/Silverteal/yggdrasil-client) 是基于 ADOFAI 和 aiohttp 的 Minecraft Yggdrasil
协议兼容客户端,支持 Mojang 后端。
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Silverteal/adofai",
    "name": "adofai",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.12",
    "maintainer_email": null,
    "keywords": "minecraft, mc, authlib, authlib-injector, implementaion, abc, yggdrasil",
    "author": "Silverteal",
    "author_email": "67404722+Silverteal@users.noreply.github.com",
    "download_url": "https://files.pythonhosted.org/packages/7b/dd/e54037a7b91d98cbb253405fe8d7d2de86005c5c0427ac5a8dad95184c54/adofai-0.1.0rc0.tar.gz",
    "platform": null,
    "description": "# ADOFAI\n\n*\u672c\u9879\u76ee\u548c A Dance Of Fire And Ice \uff08\u4e2d\u6587\u540d\u201c\u51b0\u4e0e\u706b\u4e4b\u821e\u201d\uff09\u6ca1\u6709\u4efb\u4f55\u5173\u7cfb*\n\nADOFAI (Adjustable Data Objects For Authlib Injector) \u662f\u4e00\u7ec4\u6570\u636e\u6a21\u578b\u548c\u914d\u5957\u5de5\u5177\uff0c\u65e8\u5728\u7b80\u5316\u81ea\u5b9a\u4e49\u5b9e\u73b0 Authlib-injector \u7684\u89c4\u8303\nYggdrasil \u670d\u52a1\u7aef\u3001\u5ba2\u6237\u7aef\u53ca\u5176\u914d\u5957\u7a0b\u5e8f\u7684\u8fc7\u7a0b\u3002\n\nYggdrasil \u662f\u6e38\u620f Minecraft \u4e2d\u8eab\u4efd\u9a8c\u8bc1\u670d\u52a1\u7684\u5b9e\u73b0\u540d\u79f0\u3002\n\n## \u5feb\u901f\u5f00\u59cb\n\n### \u5b89\u88c5\n\n```shell\npip install adofai\n```\n\n### \u793a\u4f8b\n\n```python\nfrom adofai import GameName, TextureUrl\nfrom adofai.models import GameProfile, TextureProfile, TextureProperty\nfrom adofai.utils.uuid import offline_uuid\nfrom adofai.utils.signing import dummy_key\n\ntexture = TextureProfile(\n    skin=TextureProperty(\n        url=TextureUrl(\"https://something\"),\n        metadata={\"model\": \"slim\"}\n    ),\n    cape=TextureProperty(\n        url=TextureUrl(\"https://yetanother\")\n    )\n)\n\ngame_profile = GameProfile(\n    name=\"Notch\",\n    id=offline_uuid(GameName(\"Notch\")),\n    texture=texture,\n    extra_properties={\"uploadableTextures\": \"skin,cape\"}\n)\n\nprint(game_profile.serialize(\"full\", dummy_key()))\n\n```\n\n## \u53e6\u8bf7\u53c2\u9605\n\n[Yggdrasil Scaffold](https://github.com/silverteal/yggdrasil-scaffold) \u662f\u57fa\u4e8e ADOFAI \u548c FastAPI \u7684 Yggdrasil\n\u8eab\u4efd\u9a8c\u8bc1\u534f\u8bae\u5b9e\u73b0\u811a\u624b\u67b6\u3002\n\n[Yggdrasil Client](https://github.com/Silverteal/yggdrasil-client) \u662f\u57fa\u4e8e ADOFAI \u548c aiohttp \u7684 Minecraft Yggdrasil\n\u534f\u8bae\u517c\u5bb9\u5ba2\u6237\u7aef\uff0c\u652f\u6301 Mojang \u540e\u7aef\u3002",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Shared data model for authlib-injector yggdrasil implementation and Minecraft API services",
    "version": "0.1.0rc0",
    "project_urls": {
        "Homepage": "https://github.com/Silverteal/adofai",
        "Repository": "https://github.com/Silverteal/adofai"
    },
    "split_keywords": [
        "minecraft",
        " mc",
        " authlib",
        " authlib-injector",
        " implementaion",
        " abc",
        " yggdrasil"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3b75bb32128674a2c01aeba7c3a1ff3b01062fd4f333b86615824ae4af9e9a9c",
                "md5": "b9475f6ffc48160cc64a487760cce8d9",
                "sha256": "908de25012f3cd84411d9bf2c3a42030f5a84be2731fe7b3ae46fdc9dc56ebf2"
            },
            "downloads": -1,
            "filename": "adofai-0.1.0rc0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b9475f6ffc48160cc64a487760cce8d9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.12",
            "size": 10761,
            "upload_time": "2024-10-06T11:47:33",
            "upload_time_iso_8601": "2024-10-06T11:47:33.083348Z",
            "url": "https://files.pythonhosted.org/packages/3b/75/bb32128674a2c01aeba7c3a1ff3b01062fd4f333b86615824ae4af9e9a9c/adofai-0.1.0rc0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7bdde54037a7b91d98cbb253405fe8d7d2de86005c5c0427ac5a8dad95184c54",
                "md5": "9834cb8dc5fabcf32c1f6dbf256435e4",
                "sha256": "5ff830744a3ff6a8d19725f9b54d279b2859e2e3c4d9cc54b228bedeed804c1d"
            },
            "downloads": -1,
            "filename": "adofai-0.1.0rc0.tar.gz",
            "has_sig": false,
            "md5_digest": "9834cb8dc5fabcf32c1f6dbf256435e4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.12",
            "size": 8848,
            "upload_time": "2024-10-06T11:47:34",
            "upload_time_iso_8601": "2024-10-06T11:47:34.388095Z",
            "url": "https://files.pythonhosted.org/packages/7b/dd/e54037a7b91d98cbb253405fe8d7d2de86005c5c0427ac5a8dad95184c54/adofai-0.1.0rc0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-06 11:47:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Silverteal",
    "github_project": "adofai",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "adofai"
}
        
Elapsed time: 0.75325s