Git Product home page Git Product logo

hsr-data's Introduction


Logo

Documentation (🚧 only for feedback 🚧) »
Report a Bug · Discord

What is this?

  • provides a fully typed python API for Honkai: Star Rail Data.
  • Is an API wrapper over starrailstation and others like Hoylab.
  • Python library is still work in progress, contributions are welcome.

Raw Data and Images

If you're just looking for raw data (json) for characters, lightcones etc., images , check data branch of this repo.

Alternatively, see raw_data.py to generate it yourself, it gets all data from starrailstation and saves it in json format.

WARN: simulatedUniverse data might throw errors as date calculation is not month safe, it might throw date not exists in month type errors.

Want to Contribute ?

any kind of help is welcome, Fork and start a pull request, or just create an issue.

hsr-data's People

Contributors

bestclaws avatar gamer-mitsuha avatar reko-beep avatar rfdzan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

hsr-data's Issues

Error while running raw_data.py

PS C:\Users\Vocaloid2048\Desktop\hsr-data-master> & C:/Users/Vocaloid2048/AppData/Local/Programs/Python/Python310/python.exe c:/Users/Vocaloid2048/Desktop/hsr-data-master/raw_data.py
Traceback (most recent call last):
File "c:\Users\Vocaloid2048\Desktop\hsr-data-master\raw_data.py", line 1, in
from main import SRSClient
File "c:\Users\Vocaloid2048\Desktop\hsr-data-master\main.py", line 2, in
from datamodels.searchItem import *
File "c:\Users\Vocaloid2048\Desktop\hsr-data-master\datamodels_init_.py", line 1, in
from . import chara, trace
File "c:\Users\Vocaloid2048\Desktop\hsr-data-master\datamodels\chara.py", line 4, in
from . import trace
File "c:\Users\Vocaloid2048\Desktop\hsr-data-master\datamodels\trace.py", line 21, in
class BonusAbility:
File "c:\Users\Vocaloid2048\Desktop\hsr-data-master\datamodels\trace.py", line 29, in BonusAbility
activation_mats: List[(Material, int)]
File "C:\Users\Vocaloid2048\AppData\Local\Programs\Python\Python310\lib\typing.py", line 312, in inner
return func(*args, **kwds)
File "C:\Users\Vocaloid2048\AppData\Local\Programs\Python\Python310\lib\typing.py", line 1144, in getitem
_check_generic(self, params, self._nparams)
File "C:\Users\Vocaloid2048\AppData\Local\Programs\Python\Python310\lib\site-packages\typing_extensions.py", line 106, in _check_generic
raise TypeError(f"Too {'many' if alen > elen else 'few'} parameters for {cls};"
TypeError: Too many parameters for typing.List; actual 2, expected 1

O_VALUE (Version 1.2.0)

Sorry for asking a dummy question, is that there have any possible way to get O_VALUE by user/myself? It seems O_VALUE has changed again (Since Version 1.2.0 updated) ...
Thx for your help if possible Also sorry again if it's silly

  • Voc

cannot import name 'SRSBackend' from partially initialized module 'hsr_client.backend.srs_backend'

After downloading the latest version of hsr-data-master and run the raw-data.py, I got these errors...
Btw, thx for your help first ~

PS C:\Users\Vocaloid2048\Desktop\hsr-data-master> & C:/Users/Vocaloid2048/AppData/Local/Programs/Python/Python310/python.exe c:/Users/Vocaloid2048/Desktop/hsr-data-master/raw_data.py
Traceback (most recent call last):
  File "c:\Users\Vocaloid2048\Desktop\hsr-data-master\raw_data.py", line 1, in <module>
    from main import SRSClient
  File "c:\Users\Vocaloid2048\Desktop\hsr-data-master\main.py", line 2, in <module>
    from hsr_client.datamodels.searchItem import *
  File "c:\Users\Vocaloid2048\Desktop\hsr-data-master\hsr_client\__init__.py", line 3, in <module>
    from hsr_client.backend import BackendAdapter
  File "c:\Users\Vocaloid2048\Desktop\hsr-data-master\hsr_client\backend\__init__.py", line 5, in <module>
    from .srs_backend import SRSBackend
  File "c:\Users\Vocaloid2048\Desktop\hsr-data-master\hsr_client\backend\srs_backend\__init__.py", line 5, in <module>
    from hsr_client.backend.srs_backend.parsers.material import parse_material
  File "c:\Users\Vocaloid2048\Desktop\hsr-data-master\hsr_client\backend\srs_backend\parsers\material.py", line 6, in <module>
    from hsr_client.backend.srs_backend import SRSBackend
ImportError: cannot import name 'SRSBackend' from partially initialized module 'hsr_client.backend.srs_backend' (most likely due to a circular import) (c:\Users\Vocaloid2048\Desktop\hsr-data-master\hsr_client\backend\srs_backend\__init__.py)

O_VALUE

Hi, this project is awesome and useful. Recently I have used master branch to download raw_data, but the data seems to become inaccurate these days (hash of some images became 404). After changing O_VALUE to "e2f24f9ed0117cf0db2e1ecf375f7e6a", the problems solved. Maybe the O_VALUE should be changed regularly?

A little bit issues on ./hsr_client/backend/srs_backend/__init__.py

Sorry for holding an issue agan ...
After my silly testing on running raw_data.py (branch "master")
I've found that there have two little mistakes :

Row 014 : import datamodels as models >>> I guess u mean hsr_client.datamodels
Row 101 : def get_all_items(self, type: Types = None, language: Languages = Languages.ENG) -> list[SearchItem]: >>> According to the constants.py in ./hsr_client , it should be EN instead of ENG

Finally, thx for your hard work and notice!

  • Voc

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.