Module for generating Honkai Star Rail character cards
Project description
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
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:
- Patreon: https://www.patreon.com/deviantapi
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hsrcard-1.0.3.tar.gz
(2.5 MB
view details)
Built Distribution
File details
Details for the file hsrcard-1.0.3.tar.gz
.
File metadata
- Download URL: hsrcard-1.0.3.tar.gz
- Upload date:
- Size: 2.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.11.5 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7165274bedb1b97be01645c462e48bdb71fb4cc9ee31e07e7842c756b47abbd8 |
|
MD5 | 3fce5dea07ab85f3a171d44e56ade8a4 |
|
BLAKE2b-256 | 61386edff448bd910a98193eb68b8fa64d85f5da5509d2e4014ba374688bcc50 |
File details
Details for the file hsrcard-1.0.3-py3-none-any.whl
.
File metadata
- Download URL: hsrcard-1.0.3-py3-none-any.whl
- Upload date:
- Size: 2.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.11.5 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce8fb9aba38b758358c848ec46510cb4e201e185acc18e7ec2482f01590043b0 |
|
MD5 | eb38fbf36f0a887497f2417e2b8a60b9 |
|
BLAKE2b-256 | e8a4bf07d1cd5cbf56c76afa19da8772f7737f00ce252fc945677c6a7bd7bc60 |