Skip to main content

Banner

HSRCard

Add-on module for generating Honkai Star Rail character cards in EnkaNetwork style


  • Python 3.9
  • Pillow 10.0.1
  • cachetools 5.3.1
  • honkairail 1.1.0

Installation:

pip install hsrcard

Launch:

# Import necessary modules
from hsrcard import hsr
import asyncio

# Define the main function that fetches information about a player using a specified UID
async def main(uid):
  async with hsr.HonkaiCard() as hmhm:
    result = await hmhm.creat(uid)
  print(result)

asyncio.run(main(700649319))
print(result)
  • Output explanation:
  • settings:
  • uid=800293940 - UID (unique identifier) of the player is 800293940.
  • lang='en' - the game language is set to English.
  • hide=False - player profile information is not hidden.
  • save=True - information saving setting is enabled.
  • background=None - no background image.

  • player:
  • uid='700649319' - player's UID is 700649319.
  • nickname='Korzzex' - player's nickname is "Korzzex".
  • level=69 - player's level is 69.
  • avatar - information about the player's avatar:
  • id='201212' - avatar identifier.
  • name='Jingliu' - avatar name is "Jingliu".
  • icon - URL of the avatar image.
  • signature="----".
  • friend_count=39 - the player has 39 friends.
  • world_level=6 - player's world level is 6.

  • card (list of player's character cards):
  • Card(id='1212', name='Jingliu', rarity=5, card=<PIL.Image.Image ...): Information about the "Jingliu" character card:
  • id='1212' - card identifier.
  • name='Jingliu' - character name.
  • rarity=5 - card rarity is 5.
  • card - card image.
  • (similar entries for other character cards).

  • name - list of character names separated by commas: "Jingliu, Silver Wolf, Seele, Luocha".

  • id - list of character card identifiers separated by commas: "1212, 1006, 1102, 1203".

Example

Example Splash Art

Adaptation

Example User Art

Adaptation

Languages Supported

Languege Code Languege Code Languege Code
English en русский ru Chinese chs
Tiếng Việt vi ไทย th Taiwan cht
português pt 한국어 kr deutsch de
日本語 jp 中文 zh español es
中文 zh Indonesian id français fr
Українська ua

Thank the author for the code:

Metadata

Release files for hsrcard 1.0.3

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

Source distribution (sdist)

Source distribution for hsrcard 1.0.3
File Size Uploaded
hsrcard-1.0.3.tar.gz 2.5 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for hsrcard 1.0.3
File Interpreter ABI Platform
hsrcard-1.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 5.1 MB

Release files / hsrcard-1.0.3.tar.gz

Download URL hsrcard-1.0.3.tar.gz
Size 2.5 MB
Tags Source
SHA-256 checksum
How to use checksums
7165274bedb1b97be01645c462e48bdb71fb4cc9ee31e07e7842c756b47abbd8
BLAKE2b-256 checksum
How to use checksums
61386edff448bd910a98193eb68b8fa64d85f5da5509d2e4014ba374688bcc50
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.11.5 Windows/10

Release files / hsrcard-1.0.3-py3-none-any.whl

Download URL hsrcard-1.0.3-py3-none-any.whl
Size 2.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
ce8fb9aba38b758358c848ec46510cb4e201e185acc18e7ec2482f01590043b0
BLAKE2b-256 checksum
How to use checksums
e8a4bf07d1cd5cbf56c76afa19da8772f7737f00ce252fc945677c6a7bd7bc60
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.11.5 Windows/10

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 release files

1.0.2

2 release files

1.0.1

2 release files

0.0.1

2 release files

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