Skip to main content

HSR Cards

An async Python library for Honkai: Star Rail character, equipment, endgame, and player cards, with independent Nanoka, Prydwen, and HoYoLAB clients. Requires Python 3.10+.

Documentation website · Documentation index · API reference · Card showcase

Install the current repository in your virtual environment:

git clone https://github.com/MR-LORD-REX/hsr-cards.git
cd hsr-cards
python -m pip install -e .
import asyncio
from hsr_cards import HonkaiStarrail

async def main():
    async with HonkaiStarrail() as client:
        card = await client.get_character_info(1507, version="4.7.51")
        card.save("character-info.png")

asyncio.run(main())

Game sprite paths normalize Windows and POSIX separators before icon lookup. English cards fall back to bundled DIN fonts when optional system fonts are missing or unreadable. Chinese, Japanese, and Korean Nanoka cards also look for installed Noto CJK or macOS language fonts; install a suitable CJK font for full character coverage.

Optional Prydwen browser collection discovers installed Chrome/Chromium on Windows, Linux, and macOS. If none is found, it uses Playwright's managed Chromium. Install the browser extra and managed browser when needed:

python -m pip install "hsr-cards[browser]"
python -m playwright install chromium

An explicit chrome= or --chrome path overrides discovery.

See the quickstart, endgame guide, player cards. The documentation tracks the current source checkout; published package versions may have an older API.

MIT license · Report an issue

A community project independent of HoYoverse, Nanoka, and Prydwen.

Metadata

Release files for hsr-cards 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hsr-cards 1.1.1
File Size Uploaded Provenance Actions
hsr_cards-1.1.1.tar.gz 3.0 MB Without provenance Details for hsr_cards-1.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hsr-cards 1.1.1
File Interpreter ABI Platform Actions
hsr_cards-1.1.1-py3-none-any.whl Python 3 none any Details for hsr_cards-1.1.1-py3-none-any.whl

Total release size: 6.0 MB

Release files / hsr_cards-1.1.1.tar.gz

Download URL hsr_cards-1.1.1.tar.gz
Size 3.0 MB
Tags Source
SHA-256 checksum
How to use checksums
55c801851d15b664d3b423fff1e5a56797a9f9ef2adbdbf603ece48d682dd15c
BLAKE2b-256 checksum
How to use checksums
3368b70b110805bc72566895b3887373627b30f4fb892e2421596ab87cdac3e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / hsr_cards-1.1.1-py3-none-any.whl

Download URL hsr_cards-1.1.1-py3-none-any.whl
Size 3.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
b5c9ef1abf7a3a4c817628c5ef9481499dde732188c03e79392b748b2b4195b2
BLAKE2b-256 checksum
How to use checksums
e257111ca6f3cc361eb882d5565db32f6ffecb82d1f69ac8f78a9eca105770b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for hsr-cards 1.1.1

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page