Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wynwxst/genshin.py
A pythonic wrapper for the genshin api
https://github.com/wynwxst/genshin.py
Last synced: 8 days ago
JSON representation
A pythonic wrapper for the genshin api
- Host: GitHub
- URL: https://github.com/wynwxst/genshin.py
- Owner: wynwxst
- Created: 2022-03-08T12:13:53.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-03-08T12:13:56.000Z (almost 3 years ago)
- Last Synced: 2024-11-13T04:34:04.005Z (2 months ago)
- Language: Python
- Size: 2.93 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Genshin.py
A simple wrapper for the genshin api for python
### Installation:
`pip install genshin.py`### Usage:
```python
import genshin
### Currently avaliable types for 2022
#['artifacts', 'boss', 'characters', 'consumables', 'domains', 'elements', 'enemies', 'materials', 'nations', 'weapons']
g = genshin.Genshin(local=False) # set local to true to use local storage
print(g.types)
o = g.api("type") # replace type with any value from g.types
# methods for api object
print(o.values)
print(o.get("query")) #get json formatted data for a query eg. if the type is characters then albedo would return stats for albedo
print(o.search("query")) # experimental searching through the api
```### Development:
Install buildproj:`pip install buildproj`
`build`
In case of the binary not working:
`python buildbinary.py`
All processes are automated except for the sign in for pip, please be sure to also change the version and name in `setup.py
### Tests:
Install buildproj:`pip install buildproj`
`build test`
In case of the binary not working:
`python buildbinary.py test`