Go to file
洛水居室 f61f2951a5
Add player ID check to client fixtures
In various client fixtures, a player ID check has been added to ensure that the player ID parameter is not None before creating the client object. This check helps to handle scenarios where the player ID is not provided, preventing potential errors or undesired behavior.
2023-05-12 11:36:03 +08:00
simnet 🎨 format code with black 2023-05-12 11:24:06 +08:00
tests Add player ID check to client fixtures 2023-05-12 11:36:03 +08:00
.deepsource.toml 🎉 Initial commit 2023-05-02 01:02:47 +08:00
.gitignore 🔧 Add .idea/ to .gitignore 2023-05-08 09:10:56 +08:00
LICENSE 📄 Add license 2023-05-09 12:21:15 +08:00
pyproject.toml 🔧 Add pyproject.toml package metadata 2023-05-09 12:25:00 +08:00
README.md 📝 Add README.md 2023-05-02 01:02:53 +08:00
requirements.dev.txt Update test 2023-05-08 09:21:32 +08:00
requirements.txt 🎉 Initial commit 2023-05-02 01:02:47 +08:00
setup.py Add setup 2023-05-08 11:37:45 +08:00

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())

Credits