mirror of
https://github.com/PaiGramTeam/SIMNet.git
synced 2024-11-21 21:58:05 +00:00
07977a7738
The project was originally initialized as 'ApiHelper', but has since been formally renamed to 'SIMNet'. This commit updates the base exception class name and the associated documentation comment to reflect this change, for consistency. |
||
---|---|---|
simnet | ||
tests | ||
.deepsource.toml | ||
.gitignore | ||
LICENSE | ||
pyproject.toml | ||
README.md | ||
requirements.dev.txt | ||
requirements.txt | ||
setup.py |
Semi-Intransient Matrix Network
Modern API wrapper for Genshin Impact & Honkai: Star Rail built on asyncio and pydantic.
Requirements
- Python 3.9+
- httpx
- Pydantic
Example
A very simple example of how simnet would be used:
import asyncio
import simnet
async def main():
cookies = {} # write your cookies
player_id = 123456789
async with simnet.StarRailClient(cookies, player_id=player_id) as client:
data = await client.get_starrail_user()
print(f"Player has a total of {data.stats.avatar_num} characters")
asyncio.run(main())
Note that Hoyolab has not implemented Battle Chronicle for Honkai Star Rail yet (as of 05/16/2023). HSR related features will be unavailable for global players. For more details, check issue #24
Credits
- genshin.py: fork source