Skip to content

Commit

Permalink
🔖 First release 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mobyw committed May 31, 2023
1 parent 80a3091 commit 597b448
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 4 deletions.
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,42 @@
# 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`.
6 changes: 3 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "starrailres"
version = "0.0.1"
version = "1.0.0"
description = "StarRailRes index package."
authors = ["mobyw <[email protected]>"]
license = "MIT"
Expand Down
Binary file added requirements.txt
Binary file not shown.

0 comments on commit 597b448

Please sign in to comment.