Metadata-Version: 2.1
Name: adofai
Version: 0.1.0.dev4
Summary: Shared data model for authlib-injector yggdrasil implementation and Minecraft API services
Home-page: https://github.com/Silverteal/adofai
License: MIT
Keywords: minecraft,mc,authlib,authlib-injector,implementaion,abc,yggdrasil
Author: Silverteal
Author-email: 67404722+Silverteal@users.noreply.github.com
Requires-Python: >=3.12,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: pycryptodome (>=3.21.0,<4.0.0)
Project-URL: Repository, https://github.com/Silverteal/adofai
Description-Content-Type: text/markdown

# 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
身份验证协议实现脚手架。
