Minimal async Python wrapper for the Seraph API.
Requires Python 3.14+
pip install git+https://github.com/proxhyhq/seraph.gitimport asyncio
import seraph
async def main():
async with seraph.Seraph(api_key="your-key") as client:
bl = await client.blacklist("player-uuid")
print(bl.data.username, bl.data.blacklist.reason)
asyncio.run(main())All methods are async and raise SeraphError on any non-2xx response.
Fetch a player's blacklist record. player is a UUID or username.
bl = await client.blacklist("4fa6e55b-d66a-43c6-949d-a5116ae2d39f")
bl.success # bool
bl.data.uuid # str
bl.data.username # str
bl.data.blacklist # BlacklistInfo | None
bl.data.safelist # PlayerSafelistInfo | None
bl.data.annoylist # AnnoylistInfo | None
bl.data.bot # BotInfo | None
bl.data.member # MemberInfo | None
bl.data.name_change # NameChangeInfo | None
bl.data.statistics # Statistics | None
bl.data.custom_tag # str | NoneCheck whether a player is on your personal safelist.
sl = await client.safelist("4fa6e55b-...")
sl.safelist.valid # bool
sl.safelist.uuid # strCubelify-formatted blacklist data. score is a comma-separated list of sniper score factors.
cub = await client.cubelify_blacklist("4fa6e55b-...", score="bhop,killaura")
cub.score # CubelifyScore | None (.mode, .value)
cub.tags # tuple[CubelifyTag, ...]
cub.tags[0].tag_name # str
cub.tags[0].alert # bool — Seraph mod integration flag
cub.timestamp # strSubmit a sniper report. Requires staff-level API key.
report = seraph.SniperReport(
uuid="4fa6e55b-...",
reason="Sniped bombies",
report_type="sniping",
evidence="https://youtube.com/...",
)
result = await client.add_sniper(report)Fetch a random Minecraft skin as raw PNG bytes.
png = await client.skin()
open("skin.png", "wb").write(png)Fetch all tags associated with the authenticated account.
tags = await client.fetch_tags()
tags[0].tag_name # str
tags[0].color # int
tags[0].tag_options # tuple[UserTag, ...] — nestedCreate or update a user tag.
await client.update_tag(seraph.TagUpdate(
api_key="your-key",
tag_name="VIP",
text="VIP",
color="#00ff00",
enabled=True,
))Fetch general info for the authenticated account. Returns a raw dict (schema varies).
try:
bl = await client.blacklist("bad-uuid")
except seraph.SeraphError as e:
print(e.status) # HTTP status code (int)
print(e.cause) # human-readable message (str)
print(e.code) # API error code (int)
for detail in e.errors:
print(detail.name, detail.reason)All response models are frozen dataclasses (slots=True, frozen=True). Input models (SniperReport, TagUpdate) are mutable. Every model exposes from_dict / to_dict if you need to work with raw JSON.
| Model | Description |
|---|---|
BlacklistResponse |
Full player blacklist record |
BlacklistData |
Nested data inside BlacklistResponse |
BlacklistInfo |
Blacklist sub-record |
AnnoylistInfo |
Annoylist sub-record |
PlayerSafelistInfo |
Safelist sub-record inside blacklist data |
BotInfo |
Bot detection sub-record |
MemberInfo |
Member sub-record |
NameChangeInfo |
Name-change history sub-record |
Statistics |
Encounter/threat statistics |
SafelistResponse |
Personal safelist check result |
CubelifyResponse |
Cubelify-formatted blacklist data |
CubelifyScore |
Sniper score (mode, value) |
CubelifyTag |
Individual Cubelify tag |
SniperReport |
Input/output for sniper reports |
UserTag |
Website user tag (recursive via tag_options) |
TagUpdate |
Input for creating/updating a tag |
TagOption |
Age-based option within a TagUpdate |
SeraphError |
Raised on any API error |
ErrorDetail |
Individual error detail inside SeraphError |
uv run pytest