# StarRailRes-Python
A python library for StarRailRes.
## Installation
```bash
pip install starrailres
```
## Usage
```python
from pathlib import Path
from starrailres import CharacterBasicInfo, Index, LevelInfo
# replace with index folder
index = Index(Path("index") / "en")
basic = CharacterBasicInfo(
id="1102",
rank=0,
level=70,
promotion=5,
skill_tree_levels=[
LevelInfo(id="1102001", level=2),
LevelInfo(id="1102002", level=5),
LevelInfo(id="1102003", level=6),
LevelInfo(id="1102004", level=5),
LevelInfo(id="1102007", level=1),
LevelInfo(id="1102101", level=1),
LevelInfo(id="1102102", level=1),
LevelInfo(id="1102201", level=1),
LevelInfo(id="1102202", level=1),
],
)
character = index.get_character_info(basic)
print(character)
```
For more examples, see `examples`.
Raw data
{
"_id": null,
"home_page": "https://github.com/Mar-7th/starrailres.py",
"name": "starrailres",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.8",
"maintainer_email": null,
"keywords": null,
"author": "mobyw",
"author_email": "mobyw66@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/e6/39/eff431edc32b58f85840888720cadf5a3f3f2b72817a2c8a1b0b274f844e/starrailres-2.1.0.tar.gz",
"platform": null,
"description": "# StarRailRes-Python\n\nA python library for StarRailRes.\n\n## Installation\n\n```bash\npip install starrailres\n```\n\n## Usage\n\n```python\nfrom pathlib import Path\nfrom starrailres import CharacterBasicInfo, Index, LevelInfo\n\n# replace with index folder\nindex = Index(Path(\"index\") / \"en\")\n\nbasic = CharacterBasicInfo(\n id=\"1102\",\n rank=0,\n level=70,\n promotion=5,\n skill_tree_levels=[\n LevelInfo(id=\"1102001\", level=2),\n LevelInfo(id=\"1102002\", level=5),\n LevelInfo(id=\"1102003\", level=6),\n LevelInfo(id=\"1102004\", level=5),\n LevelInfo(id=\"1102007\", level=1),\n LevelInfo(id=\"1102101\", level=1),\n LevelInfo(id=\"1102102\", level=1),\n LevelInfo(id=\"1102201\", level=1),\n LevelInfo(id=\"1102202\", level=1),\n ],\n)\n\ncharacter = index.get_character_info(basic)\nprint(character)\n```\n\nFor more examples, see `examples`.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "StarRailRes parse package",
"version": "2.1.0",
"project_urls": {
"Homepage": "https://github.com/Mar-7th/starrailres.py",
"Repository": "https://github.com/Mar-7th/starrailres.py"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2d6c713fae60a797fbd27b60eff1d84c968e1c2bef8f10452d15594236eff9f8",
"md5": "ae1f0cb54740128ed50db8895d4af28e",
"sha256": "8f9ef7cfcc09fb423ab4bf70a587e845da3945efac912cf44d4fd7ef2fae2c4d"
},
"downloads": -1,
"filename": "starrailres-2.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ae1f0cb54740128ed50db8895d4af28e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.8",
"size": 12632,
"upload_time": "2024-05-26T10:03:58",
"upload_time_iso_8601": "2024-05-26T10:03:58.284144Z",
"url": "https://files.pythonhosted.org/packages/2d/6c/713fae60a797fbd27b60eff1d84c968e1c2bef8f10452d15594236eff9f8/starrailres-2.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e639eff431edc32b58f85840888720cadf5a3f3f2b72817a2c8a1b0b274f844e",
"md5": "29bb2178273ad2488c48532e29979f62",
"sha256": "e3a9f2efbc4eca6cbc29592651f2746bf1f9657f17cae8cb6a715a75a043efde"
},
"downloads": -1,
"filename": "starrailres-2.1.0.tar.gz",
"has_sig": false,
"md5_digest": "29bb2178273ad2488c48532e29979f62",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.8",
"size": 9602,
"upload_time": "2024-05-26T10:03:59",
"upload_time_iso_8601": "2024-05-26T10:03:59.572881Z",
"url": "https://files.pythonhosted.org/packages/e6/39/eff431edc32b58f85840888720cadf5a3f3f2b72817a2c8a1b0b274f844e/starrailres-2.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-26 10:03:59",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Mar-7th",
"github_project": "starrailres.py",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "starrailres"
}