recard
Async Genshin Impact character card generator, built the same way you'd use
zenka for Zenless Zone Zero: give it a
UID, get back rendered card images.
pip install ./recard # local build, see "Installing" below
import asyncio
import recard
async def main():
async with recard.Client() as client:
# list everything currently in the player's public showcase
showcase = await client.get_api(700000000)
for char in showcase:
print(char.id, char.name, char.element)
# render one character by name
result = await client.card(700000000, "Hu Tao")
for card in result.cards:
card.card.save(f"{card.name}.png") # card.card is a PIL.Image
# ...or by exact avatar ID, same call shape
result = await client.card(700000000, 10000046)
# or render the whole showcase at once
result = await client.card(700000000)
for card in result.cards:
card.card.save(f"{card.name}.png")
asyncio.run(main())
How it works / limitations
- Data comes from Enka.Network's public showcase API - no login, no
cookies, just a UID. This means (same limitation
zenkahas for ZZZ): only the up-to-8 characters a player has pinned to their in-game showcase are available, and only their most recently synced build. data/char.json,data/data.json,data/new.json,data/avatars.jsonare point-in-time snapshots of Genshin's character/namecard data. Refresh them after a new patch:python -m recard.data.update_data
(or justpython recard/data/update_data.pyif you're working from a checkout instead of an installed package).- Custom splash art (equivalent of
!add_splashin the original bot) is read from~/.recard/custom_splash/<char_id>.(png|jpg|jpeg|webp). - HoYoLAB-cookie-authenticated fallbacks (used for brand-new characters not
yet in
char.json, or characters not in the public showcase at all) are intentionally left out of this library to keep it credential-free, same aszenka. If you need that, callcards.character_card .CharacterCardGenerator._lookup_character_info/_ensure_character_ recorddirectly with your own authenticatedgenshin.Client.
Installing
This isn't published to PyPI yet. Until then:
pip install ./recard
# or, for local editing:
pip install -e ./recard
Once published:
pip install recard
License
The code in this repository is MIT-licensed - see LICENSE.
Note on bundled assets: recard/assets/ and recard/data/ ship
game data, fonts, icons, and character art from Genshin Impact,
© COGNOSPHERE PTE. LTD. / HoYoverse. These are included for card
rendering purposes only, are not covered by this project's MIT license,
and all rights to them remain with their original owner. This project
is an unofficial fan tool and is not affiliated with or endorsed by
HoYoverse.
Metadata
Release files for recard 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| recard-0.1.3.tar.gz | 14.0 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| recard-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 28.0 MB
Release files / recard-0.1.3.tar.gz
| Download URL | recard-0.1.3.tar.gz |
|---|---|
| Size | 14.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c6bd20fdf79ab3aa059ac802bf65b384e0c713bf935975018942bd091e5364a1
|
|
BLAKE2b-256 checksum How to use checksums |
967609d7f2a531692d22ff16a26ffae993782a50eb2762f1c70a1add7c533eec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.2
|
Release files / recard-0.1.3-py3-none-any.whl
| Download URL | recard-0.1.3-py3-none-any.whl |
|---|---|
| Size | 14.1 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8ac21c4c96501f9d63e423f7b7b696b9b348f85babdcd574d62b69c1f8f9e10c
|
|
BLAKE2b-256 checksum How to use checksums |
255f4deff7df831f044bb492750d1bdeeb579a06ad15b3ba4c1aa1fc9da5cbd3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.2
|