This release is a pre-release and may not be stable for production use.
Yggdrasil Client based on ADOFAI
基于 ADOFAI 和 aiohttp 的 Minecraft Yggdrasil 协议兼容客户端,支持 Mojang 后端。
目前已经实现了 Authlib-Injector Yggdrasil 协议中所有公共(无需认证) API 的包装
Yggdrasil 是 Minecraft 中身份验证服务的实现名称。
快速开始
安装
pip install yggdrasil-client
示例
import asyncio
from uuid import UUID
from adofai import GameName, GameId
from yggdrasil_client import AuthInjCompatibleProvider, MojangProvider
async def usage_example():
littleskin = AuthInjCompatibleProvider("https://littleskin.cn/api/yggdrasil")
mojang = MojangProvider()
async with littleskin as r:
print(await r.has_joined(GameName("Notch"), "serverid"))
print(await r.query_by_name(GameName("NoTcH")))
print((await r.profile_public_key()).export_key().decode())
async with mojang as r:
print(await r.has_joined(GameName("Notch"), "serverid"))
print(await r.query_by_name(GameName("Notch")))
print(await r.query_by_uuid(GameId(UUID("069a79f444e94726a5befca90e38aaf5"))))
print(await r.query_by_uuid_raw(GameId(UUID("069a79f444e94726a5befca90e38aaf5"))))
print((await r.profile_public_keys())[0].export_key().decode())
if __name__ == "__main__":
asyncio.run(usage_example())
另请参阅
ADOFAI 是一组数据模型和配套工具,旨在简化自定义实现 Authlib-injector 的规范 Yggdrasil 服务端、客户端及其配套程序的过程。
Yggdrasil Scaffold 是基于 ADOFAI 和 FastAPI 的 Yggdrasil 身份验证协议实现脚手架。
Metadata
Release files for yggdrasil-client 0.1.0.dev10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| yggdrasil_client-0.1.0.dev10.tar.gz | 5.1 kB | Without provenance | Details for yggdrasil_client-0.1.0.dev10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| yggdrasil_client-0.1.0.dev10-py3-none-any.whl | Python 3 | none | any | Details for yggdrasil_client-0.1.0.dev10-py3-none-any.whl |
Total release size: 11.1 kB
Release files / yggdrasil_client-0.1.0.dev10.tar.gz
| Download URL | yggdrasil_client-0.1.0.dev10.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5c3be934111203b567dfb7e42c4f4f919ee37cecdb5de408548d58c29e7beef9
|
|
BLAKE2b-256 checksum How to use checksums |
2df9ed2979217e252442ec706266688e0a30c899c917b639ccb257ed6fbf5d23
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.7 Windows/10
|
Release files / yggdrasil_client-0.1.0.dev10-py3-none-any.whl
| Download URL | yggdrasil_client-0.1.0.dev10-py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
04fb140eb019b4737587a6d00d2abcd70b7aa55d3f65c798c83f37232abcd2d9
|
|
BLAKE2b-256 checksum How to use checksums |
7ac5100613438147ae32708ec88a804339df12fd7625ec9702b5316943a9e80f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.7 Windows/10
|
Security for yggdrasil-client 0.1.0.dev10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.