wow 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- wow-0.1.0/LICENSE +21 -0
- wow-0.1.0/PKG-INFO +103 -0
- wow-0.1.0/README.md +74 -0
- wow-0.1.0/pyproject.toml +179 -0
- wow-0.1.0/pyproject.toml.orig +118 -0
- wow-0.1.0/src/wow/__init__.py +52 -0
- wow-0.1.0/src/wow/_async/__init__.py +1 -0
- wow-0.1.0/src/wow/_async/_client.py +578 -0
- wow-0.1.0/src/wow/_async/_resource.py +73 -0
- wow-0.1.0/src/wow/_async/resources/__init__.py +1 -0
- wow-0.1.0/src/wow/_async/resources/account.py +19 -0
- wow-0.1.0/src/wow/_async/resources/achievement.py +39 -0
- wow-0.1.0/src/wow/_async/resources/character.py +114 -0
- wow-0.1.0/src/wow/_async/resources/creature.py +34 -0
- wow-0.1.0/src/wow/_async/resources/guild.py +29 -0
- wow-0.1.0/src/wow/_async/resources/item.py +111 -0
- wow-0.1.0/src/wow/_async/resources/mount.py +82 -0
- wow-0.1.0/src/wow/_async/resources/pet.py +20 -0
- wow-0.1.0/src/wow/_async/resources/playable_class.py +25 -0
- wow-0.1.0/src/wow/_async/resources/playable_race.py +20 -0
- wow-0.1.0/src/wow/_async/resources/playable_specialization.py +20 -0
- wow-0.1.0/src/wow/_async/resources/power_type.py +20 -0
- wow-0.1.0/src/wow/_async/resources/profession.py +31 -0
- wow-0.1.0/src/wow/_async/resources/quest.py +66 -0
- wow-0.1.0/src/wow/_async/resources/realm.py +79 -0
- wow-0.1.0/src/wow/_async/resources/recipe.py +21 -0
- wow-0.1.0/src/wow/_async/resources/region.py +20 -0
- wow-0.1.0/src/wow/_async/resources/reputation.py +39 -0
- wow-0.1.0/src/wow/_async/resources/ruleset.py +20 -0
- wow-0.1.0/src/wow/_async/resources/talent.py +38 -0
- wow-0.1.0/src/wow/_async/resources/title.py +20 -0
- wow-0.1.0/src/wow/_async/resources/toy.py +20 -0
- wow-0.1.0/src/wow/_base.py +190 -0
- wow-0.1.0/src/wow/_concurrency.py +20 -0
- wow-0.1.0/src/wow/_exceptions.py +149 -0
- wow-0.1.0/src/wow/_response.py +69 -0
- wow-0.1.0/src/wow/_sync/__init__.py +2 -0
- wow-0.1.0/src/wow/_sync/_client.py +577 -0
- wow-0.1.0/src/wow/_sync/_resource.py +74 -0
- wow-0.1.0/src/wow/_sync/resources/__init__.py +2 -0
- wow-0.1.0/src/wow/_sync/resources/account.py +20 -0
- wow-0.1.0/src/wow/_sync/resources/achievement.py +40 -0
- wow-0.1.0/src/wow/_sync/resources/character.py +115 -0
- wow-0.1.0/src/wow/_sync/resources/creature.py +35 -0
- wow-0.1.0/src/wow/_sync/resources/guild.py +30 -0
- wow-0.1.0/src/wow/_sync/resources/item.py +112 -0
- wow-0.1.0/src/wow/_sync/resources/mount.py +83 -0
- wow-0.1.0/src/wow/_sync/resources/pet.py +21 -0
- wow-0.1.0/src/wow/_sync/resources/playable_class.py +26 -0
- wow-0.1.0/src/wow/_sync/resources/playable_race.py +21 -0
- wow-0.1.0/src/wow/_sync/resources/playable_specialization.py +21 -0
- wow-0.1.0/src/wow/_sync/resources/power_type.py +21 -0
- wow-0.1.0/src/wow/_sync/resources/profession.py +32 -0
- wow-0.1.0/src/wow/_sync/resources/quest.py +67 -0
- wow-0.1.0/src/wow/_sync/resources/realm.py +80 -0
- wow-0.1.0/src/wow/_sync/resources/recipe.py +22 -0
- wow-0.1.0/src/wow/_sync/resources/region.py +21 -0
- wow-0.1.0/src/wow/_sync/resources/reputation.py +40 -0
- wow-0.1.0/src/wow/_sync/resources/ruleset.py +21 -0
- wow-0.1.0/src/wow/_sync/resources/talent.py +39 -0
- wow-0.1.0/src/wow/_sync/resources/title.py +21 -0
- wow-0.1.0/src/wow/_sync/resources/toy.py +21 -0
- wow-0.1.0/src/wow/_types.py +59 -0
- wow-0.1.0/src/wow/models/__init__.py +410 -0
- wow-0.1.0/src/wow/models/_common.py +144 -0
- wow-0.1.0/src/wow/models/account.py +60 -0
- wow-0.1.0/src/wow/models/achievement.py +76 -0
- wow-0.1.0/src/wow/models/character.py +510 -0
- wow-0.1.0/src/wow/models/creature.py +32 -0
- wow-0.1.0/src/wow/models/guild.py +75 -0
- wow-0.1.0/src/wow/models/item.py +365 -0
- wow-0.1.0/src/wow/models/mount.py +55 -0
- wow-0.1.0/src/wow/models/pet.py +39 -0
- wow-0.1.0/src/wow/models/playable_class.py +25 -0
- wow-0.1.0/src/wow/models/playable_race.py +24 -0
- wow-0.1.0/src/wow/models/playable_specialization.py +22 -0
- wow-0.1.0/src/wow/models/power_type.py +18 -0
- wow-0.1.0/src/wow/models/profession.py +39 -0
- wow-0.1.0/src/wow/models/quest.py +156 -0
- wow-0.1.0/src/wow/models/realm.py +62 -0
- wow-0.1.0/src/wow/models/recipe.py +34 -0
- wow-0.1.0/src/wow/models/region.py +20 -0
- wow-0.1.0/src/wow/models/reputation.py +56 -0
- wow-0.1.0/src/wow/models/ruleset.py +29 -0
- wow-0.1.0/src/wow/models/talent.py +125 -0
- wow-0.1.0/src/wow/models/title.py +27 -0
- wow-0.1.0/src/wow/models/toy.py +22 -0
- wow-0.1.0/src/wow/py.typed +0 -0
- wow-0.1.0/src/wow/resources.py +111 -0
- wow-0.1.0/src/wow/search.py +113 -0
wow-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Jacob Coffee
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
wow-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: wow
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Typed sync and async client for the World of Warcraft: Forever Battle.net API.
|
|
5
|
+
Keywords: api,battle.net,blizzard,sdk,warcraft,wow,wow-forever
|
|
6
|
+
Author: Jacob Coffee
|
|
7
|
+
Author-email: Jacob Coffee <jacob@z7x.org>
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: Framework :: AnyIO
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
17
|
+
Classifier: Topic :: Games/Entertainment
|
|
18
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
19
|
+
Classifier: Typing :: Typed
|
|
20
|
+
Requires-Dist: anyio>=4.11
|
|
21
|
+
Requires-Dist: httpx>=0.28.1
|
|
22
|
+
Requires-Dist: msgspec>=0.20
|
|
23
|
+
Requires-Python: >=3.14
|
|
24
|
+
Project-URL: Changelog, https://github.com/SideQuest-Guild/wow-forever-sdk/blob/main/CHANGELOG.md
|
|
25
|
+
Project-URL: Documentation, https://docs.sidequest-guild.com/developers/wow-forever-sdk/
|
|
26
|
+
Project-URL: Issues, https://github.com/SideQuest-Guild/wow-forever-sdk/issues
|
|
27
|
+
Project-URL: Repository, https://github.com/SideQuest-Guild/wow-forever-sdk
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
29
|
+
|
|
30
|
+
# wow
|
|
31
|
+
|
|
32
|
+
A typed Python client for the **World of Warcraft: Forever** Battle.net API, sync and async.
|
|
33
|
+
|
|
34
|
+
- `Client` and `AsyncClient` have the same methods. The async client runs under asyncio and trio.
|
|
35
|
+
- Each response becomes a typed, immutable [msgspec](https://msgspec.dev) model. A new field from Blizzard never stops
|
|
36
|
+
a response from decoding.
|
|
37
|
+
- The client gets, caches and refreshes app tokens for you. Profile routes use a player's token from the OAuth login.
|
|
38
|
+
- The client retries connection errors, timeouts, 408, 429 and 5xx responses, and obeys `Retry-After`.
|
|
39
|
+
- Search takes filters, ranges and sort orders, and `search_all` reads every page for you.
|
|
40
|
+
|
|
41
|
+
Blizzard does not document a Forever API. Players found the namespaces `static-forever-{region}`,
|
|
42
|
+
`dynamic-forever-{region}` and `profile-forever-{region}` by trial. This package covers the routes that answer today.
|
|
43
|
+
|
|
44
|
+
## Install
|
|
45
|
+
|
|
46
|
+
```console
|
|
47
|
+
uv add wow
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
The package needs Python 3.14 or later.
|
|
51
|
+
|
|
52
|
+
## Quick start
|
|
53
|
+
|
|
54
|
+
Create an API client at https://develop.battle.net/access/clients. Then:
|
|
55
|
+
|
|
56
|
+
```python
|
|
57
|
+
from wow import Client
|
|
58
|
+
|
|
59
|
+
with Client(client_id="...", client_secret="...") as client: # or BATTLENET_CLIENT_ID/SECRET env vars
|
|
60
|
+
warrior = client.playable_classes.get(1)
|
|
61
|
+
print(warrior.name, [spec.name for spec in warrior.specializations])
|
|
62
|
+
|
|
63
|
+
for hit in client.items.search_all(name="Thunderfury"):
|
|
64
|
+
print(hit.data.id, hit.data.name["en_US"])
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
The async client has the same calls with `await`:
|
|
68
|
+
|
|
69
|
+
```python
|
|
70
|
+
from wow import AsyncClient
|
|
71
|
+
|
|
72
|
+
async with AsyncClient(region="eu") as client:
|
|
73
|
+
races = await client.playable_races.index()
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## What it covers
|
|
77
|
+
|
|
78
|
+
| Namespace | Resources |
|
|
79
|
+
| --- | --- |
|
|
80
|
+
| static | `achievements`, `achievement_categories`, `creature_families`, `creature_types`, `items`, `item_classes`, `item_sets`, `mounts`, `pets`, `playable_classes`, `playable_races`, `playable_specializations`, `power_types`, `professions`, `quests`, `quest_areas`, `quest_categories`, `quest_types`, `recipes`, `reputation_factions`, `reputation_tiers`, `talents`, `talent_trees`, `titles`, `toys` |
|
|
81
|
+
| dynamic | `regions`, `realms`, `rulesets` |
|
|
82
|
+
| profile | `characters` and `guilds`, which an app token can read; `account`, which needs a player's token |
|
|
83
|
+
|
|
84
|
+
For any other route, call `client.get(path, namespace=...)`. It returns the raw response.
|
|
85
|
+
|
|
86
|
+
## Documentation
|
|
87
|
+
|
|
88
|
+
The guide is at https://docs.sidequest-guild.com/developers/wow-forever-sdk/ and the full API reference at
|
|
89
|
+
https://docs.sidequest-guild.com/reference/wow-forever-sdk/.
|
|
90
|
+
|
|
91
|
+
## Development
|
|
92
|
+
|
|
93
|
+
```console
|
|
94
|
+
make install # uv sync --locked
|
|
95
|
+
make ci # lint, format, types, generated code, tests at 100% coverage, docs, build
|
|
96
|
+
make help # every target
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
`make generate` writes `src/wow/_sync` from `src/wow/_async`. Edit the async code only.
|
|
100
|
+
|
|
101
|
+
## License
|
|
102
|
+
|
|
103
|
+
MIT
|
wow-0.1.0/README.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# wow
|
|
2
|
+
|
|
3
|
+
A typed Python client for the **World of Warcraft: Forever** Battle.net API, sync and async.
|
|
4
|
+
|
|
5
|
+
- `Client` and `AsyncClient` have the same methods. The async client runs under asyncio and trio.
|
|
6
|
+
- Each response becomes a typed, immutable [msgspec](https://msgspec.dev) model. A new field from Blizzard never stops
|
|
7
|
+
a response from decoding.
|
|
8
|
+
- The client gets, caches and refreshes app tokens for you. Profile routes use a player's token from the OAuth login.
|
|
9
|
+
- The client retries connection errors, timeouts, 408, 429 and 5xx responses, and obeys `Retry-After`.
|
|
10
|
+
- Search takes filters, ranges and sort orders, and `search_all` reads every page for you.
|
|
11
|
+
|
|
12
|
+
Blizzard does not document a Forever API. Players found the namespaces `static-forever-{region}`,
|
|
13
|
+
`dynamic-forever-{region}` and `profile-forever-{region}` by trial. This package covers the routes that answer today.
|
|
14
|
+
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
```console
|
|
18
|
+
uv add wow
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
The package needs Python 3.14 or later.
|
|
22
|
+
|
|
23
|
+
## Quick start
|
|
24
|
+
|
|
25
|
+
Create an API client at https://develop.battle.net/access/clients. Then:
|
|
26
|
+
|
|
27
|
+
```python
|
|
28
|
+
from wow import Client
|
|
29
|
+
|
|
30
|
+
with Client(client_id="...", client_secret="...") as client: # or BATTLENET_CLIENT_ID/SECRET env vars
|
|
31
|
+
warrior = client.playable_classes.get(1)
|
|
32
|
+
print(warrior.name, [spec.name for spec in warrior.specializations])
|
|
33
|
+
|
|
34
|
+
for hit in client.items.search_all(name="Thunderfury"):
|
|
35
|
+
print(hit.data.id, hit.data.name["en_US"])
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
The async client has the same calls with `await`:
|
|
39
|
+
|
|
40
|
+
```python
|
|
41
|
+
from wow import AsyncClient
|
|
42
|
+
|
|
43
|
+
async with AsyncClient(region="eu") as client:
|
|
44
|
+
races = await client.playable_races.index()
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## What it covers
|
|
48
|
+
|
|
49
|
+
| Namespace | Resources |
|
|
50
|
+
| --- | --- |
|
|
51
|
+
| static | `achievements`, `achievement_categories`, `creature_families`, `creature_types`, `items`, `item_classes`, `item_sets`, `mounts`, `pets`, `playable_classes`, `playable_races`, `playable_specializations`, `power_types`, `professions`, `quests`, `quest_areas`, `quest_categories`, `quest_types`, `recipes`, `reputation_factions`, `reputation_tiers`, `talents`, `talent_trees`, `titles`, `toys` |
|
|
52
|
+
| dynamic | `regions`, `realms`, `rulesets` |
|
|
53
|
+
| profile | `characters` and `guilds`, which an app token can read; `account`, which needs a player's token |
|
|
54
|
+
|
|
55
|
+
For any other route, call `client.get(path, namespace=...)`. It returns the raw response.
|
|
56
|
+
|
|
57
|
+
## Documentation
|
|
58
|
+
|
|
59
|
+
The guide is at https://docs.sidequest-guild.com/developers/wow-forever-sdk/ and the full API reference at
|
|
60
|
+
https://docs.sidequest-guild.com/reference/wow-forever-sdk/.
|
|
61
|
+
|
|
62
|
+
## Development
|
|
63
|
+
|
|
64
|
+
```console
|
|
65
|
+
make install # uv sync --locked
|
|
66
|
+
make ci # lint, format, types, generated code, tests at 100% coverage, docs, build
|
|
67
|
+
make help # every target
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
`make generate` writes `src/wow/_sync` from `src/wow/_async`. Edit the async code only.
|
|
71
|
+
|
|
72
|
+
## License
|
|
73
|
+
|
|
74
|
+
MIT
|
wow-0.1.0/pyproject.toml
ADDED
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
build-backend = "uv_build"
|
|
3
|
+
requires = ["uv-build>=0.13.7,<0.14"]
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "wow"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Typed sync and async client for the World of Warcraft: Forever Battle.net API."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
keywords = [
|
|
11
|
+
"api",
|
|
12
|
+
"battle.net",
|
|
13
|
+
"blizzard",
|
|
14
|
+
"sdk",
|
|
15
|
+
"warcraft",
|
|
16
|
+
"wow",
|
|
17
|
+
"wow-forever",
|
|
18
|
+
]
|
|
19
|
+
license = "MIT"
|
|
20
|
+
license-files = ["LICENSE"]
|
|
21
|
+
requires-python = ">=3.14"
|
|
22
|
+
classifiers = [
|
|
23
|
+
"Development Status :: 3 - Alpha",
|
|
24
|
+
"Framework :: AnyIO",
|
|
25
|
+
"Intended Audience :: Developers",
|
|
26
|
+
"Operating System :: OS Independent",
|
|
27
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
28
|
+
"Programming Language :: Python :: 3.14",
|
|
29
|
+
"Programming Language :: Python :: 3.15",
|
|
30
|
+
"Topic :: Games/Entertainment",
|
|
31
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
32
|
+
"Typing :: Typed",
|
|
33
|
+
]
|
|
34
|
+
dependencies = [
|
|
35
|
+
"anyio>=4.11",
|
|
36
|
+
"httpx>=0.28.1",
|
|
37
|
+
"msgspec>=0.20",
|
|
38
|
+
]
|
|
39
|
+
|
|
40
|
+
[[project.authors]]
|
|
41
|
+
name = "Jacob Coffee"
|
|
42
|
+
email = "jacob@z7x.org"
|
|
43
|
+
|
|
44
|
+
[project.urls]
|
|
45
|
+
Changelog = "https://github.com/SideQuest-Guild/wow-forever-sdk/blob/main/CHANGELOG.md"
|
|
46
|
+
Documentation = "https://docs.sidequest-guild.com/developers/wow-forever-sdk/"
|
|
47
|
+
Issues = "https://github.com/SideQuest-Guild/wow-forever-sdk/issues"
|
|
48
|
+
Repository = "https://github.com/SideQuest-Guild/wow-forever-sdk"
|
|
49
|
+
|
|
50
|
+
[dependency-groups]
|
|
51
|
+
test = [
|
|
52
|
+
"pytest>=9",
|
|
53
|
+
"pytest-cov>=7",
|
|
54
|
+
"respx>=0.23",
|
|
55
|
+
"trio>=0.31",
|
|
56
|
+
]
|
|
57
|
+
docs = [
|
|
58
|
+
"myst-parser>=4",
|
|
59
|
+
"shibuya>=2025.1",
|
|
60
|
+
"sphinx>=8.1",
|
|
61
|
+
"sphinx-autobuild>=2024.10",
|
|
62
|
+
"sphinx-copybutton>=0.5",
|
|
63
|
+
]
|
|
64
|
+
lint = [
|
|
65
|
+
"codespell>=2.4",
|
|
66
|
+
"prek>=0.5",
|
|
67
|
+
"pyproject-fmt>=2.30",
|
|
68
|
+
"pyrefly>=1.4",
|
|
69
|
+
"ruff>=0.17",
|
|
70
|
+
"zizmor>=1.30",
|
|
71
|
+
]
|
|
72
|
+
|
|
73
|
+
[[dependency-groups.dev]]
|
|
74
|
+
include-group = "docs"
|
|
75
|
+
|
|
76
|
+
[[dependency-groups.dev]]
|
|
77
|
+
include-group = "lint"
|
|
78
|
+
|
|
79
|
+
[[dependency-groups.dev]]
|
|
80
|
+
include-group = "test"
|
|
81
|
+
|
|
82
|
+
[tool.uv]
|
|
83
|
+
default-groups = ["dev"]
|
|
84
|
+
|
|
85
|
+
[tool.ruff]
|
|
86
|
+
line-length = 120
|
|
87
|
+
|
|
88
|
+
[tool.ruff.format]
|
|
89
|
+
docstring-code-format = true
|
|
90
|
+
|
|
91
|
+
[tool.ruff.lint]
|
|
92
|
+
select = ["ALL"]
|
|
93
|
+
ignore = [
|
|
94
|
+
"COM812",
|
|
95
|
+
"CPY001",
|
|
96
|
+
"D105",
|
|
97
|
+
"D107",
|
|
98
|
+
]
|
|
99
|
+
|
|
100
|
+
[tool.ruff.lint.per-file-ignores]
|
|
101
|
+
"docs/conf.py" = [
|
|
102
|
+
"A001",
|
|
103
|
+
"D",
|
|
104
|
+
"INP001",
|
|
105
|
+
]
|
|
106
|
+
"scripts/**" = [
|
|
107
|
+
"D",
|
|
108
|
+
"INP001",
|
|
109
|
+
"S",
|
|
110
|
+
"T201",
|
|
111
|
+
]
|
|
112
|
+
"src/wow/_sync/**" = ["UP028"]
|
|
113
|
+
"tests/**" = [
|
|
114
|
+
"ANN",
|
|
115
|
+
"ARG001",
|
|
116
|
+
"D",
|
|
117
|
+
"PLR2004",
|
|
118
|
+
"S101",
|
|
119
|
+
"S105",
|
|
120
|
+
"S106",
|
|
121
|
+
"SLF001",
|
|
122
|
+
]
|
|
123
|
+
|
|
124
|
+
[tool.ruff.lint.flake8-tidy-imports.banned-api."__future__.annotations"]
|
|
125
|
+
msg = "Python 3.14 evaluates annotations lazily (PEP 649); drop this import."
|
|
126
|
+
|
|
127
|
+
[tool.ruff.lint.flake8-type-checking]
|
|
128
|
+
runtime-evaluated-base-classes = [
|
|
129
|
+
"msgspec.Struct",
|
|
130
|
+
"wow.models._common.Document",
|
|
131
|
+
"wow.models._common.Model",
|
|
132
|
+
]
|
|
133
|
+
|
|
134
|
+
[tool.ruff.lint.isort]
|
|
135
|
+
known-first-party = ["wow"]
|
|
136
|
+
|
|
137
|
+
[tool.ruff.lint.pydocstyle]
|
|
138
|
+
convention = "google"
|
|
139
|
+
|
|
140
|
+
[tool.ruff.lint.pylint]
|
|
141
|
+
max-args = 10
|
|
142
|
+
|
|
143
|
+
[tool.codespell]
|
|
144
|
+
skip = "uv.lock,pyrefly-baseline.json,./tests/fixtures,./docs/_build,./.venv,./htmlcov,./dist"
|
|
145
|
+
|
|
146
|
+
[tool.pyrefly]
|
|
147
|
+
python-version = "3.14"
|
|
148
|
+
project-includes = [
|
|
149
|
+
"docs/conf.py",
|
|
150
|
+
"scripts",
|
|
151
|
+
"src",
|
|
152
|
+
"tests",
|
|
153
|
+
]
|
|
154
|
+
search-path = [
|
|
155
|
+
"src",
|
|
156
|
+
".",
|
|
157
|
+
]
|
|
158
|
+
baseline = "pyrefly-baseline.json"
|
|
159
|
+
preset = "strict"
|
|
160
|
+
|
|
161
|
+
[tool.pytest]
|
|
162
|
+
addopts = [
|
|
163
|
+
"--strict-markers",
|
|
164
|
+
"--strict-config",
|
|
165
|
+
"-ra",
|
|
166
|
+
]
|
|
167
|
+
filterwarnings = ["error"]
|
|
168
|
+
testpaths = ["tests"]
|
|
169
|
+
xfail_strict = true
|
|
170
|
+
|
|
171
|
+
[tool.coverage.run]
|
|
172
|
+
source = ["wow"]
|
|
173
|
+
branch = true
|
|
174
|
+
|
|
175
|
+
[tool.coverage.report]
|
|
176
|
+
fail_under = 100
|
|
177
|
+
exclude_also = ["if TYPE_CHECKING:"]
|
|
178
|
+
skip_covered = true
|
|
179
|
+
show_missing = true
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
build-backend = "uv_build"
|
|
3
|
+
requires = [ "uv-build>=0.13.7,<0.14" ]
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "wow"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Typed sync and async client for the World of Warcraft: Forever Battle.net API."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
keywords = [ "api", "battle.net", "blizzard", "sdk", "warcraft", "wow", "wow-forever" ]
|
|
11
|
+
license = "MIT"
|
|
12
|
+
license-files = [ "LICENSE" ]
|
|
13
|
+
authors = [ { name = "Jacob Coffee", email = "jacob@z7x.org" } ]
|
|
14
|
+
requires-python = ">=3.14"
|
|
15
|
+
classifiers = [
|
|
16
|
+
"Development Status :: 3 - Alpha",
|
|
17
|
+
"Framework :: AnyIO",
|
|
18
|
+
"Intended Audience :: Developers",
|
|
19
|
+
"Operating System :: OS Independent",
|
|
20
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
21
|
+
"Programming Language :: Python :: 3.14",
|
|
22
|
+
"Programming Language :: Python :: 3.15",
|
|
23
|
+
"Topic :: Games/Entertainment",
|
|
24
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
25
|
+
"Typing :: Typed",
|
|
26
|
+
]
|
|
27
|
+
dependencies = [
|
|
28
|
+
"anyio>=4.11",
|
|
29
|
+
"httpx>=0.28.1",
|
|
30
|
+
"msgspec>=0.20",
|
|
31
|
+
]
|
|
32
|
+
urls.Changelog = "https://github.com/SideQuest-Guild/wow-forever-sdk/blob/main/CHANGELOG.md"
|
|
33
|
+
urls.Documentation = "https://docs.sidequest-guild.com/developers/wow-forever-sdk/"
|
|
34
|
+
urls.Issues = "https://github.com/SideQuest-Guild/wow-forever-sdk/issues"
|
|
35
|
+
urls.Repository = "https://github.com/SideQuest-Guild/wow-forever-sdk"
|
|
36
|
+
|
|
37
|
+
[dependency-groups]
|
|
38
|
+
dev = [
|
|
39
|
+
{ include-group = "docs" },
|
|
40
|
+
{ include-group = "lint" },
|
|
41
|
+
{ include-group = "test" },
|
|
42
|
+
]
|
|
43
|
+
test = [
|
|
44
|
+
"pytest>=9",
|
|
45
|
+
"pytest-cov>=7",
|
|
46
|
+
"respx>=0.23",
|
|
47
|
+
"trio>=0.31",
|
|
48
|
+
]
|
|
49
|
+
docs = [
|
|
50
|
+
"myst-parser>=4",
|
|
51
|
+
"shibuya>=2025.1",
|
|
52
|
+
"sphinx>=8.1",
|
|
53
|
+
"sphinx-autobuild>=2024.10",
|
|
54
|
+
"sphinx-copybutton>=0.5",
|
|
55
|
+
]
|
|
56
|
+
lint = [
|
|
57
|
+
"codespell>=2.4",
|
|
58
|
+
"prek>=0.5",
|
|
59
|
+
"pyproject-fmt>=2.30",
|
|
60
|
+
"pyrefly>=1.4",
|
|
61
|
+
"ruff>=0.17",
|
|
62
|
+
"zizmor>=1.30",
|
|
63
|
+
]
|
|
64
|
+
|
|
65
|
+
[tool.uv]
|
|
66
|
+
default-groups = [ "dev" ]
|
|
67
|
+
|
|
68
|
+
[tool.ruff]
|
|
69
|
+
line-length = 120
|
|
70
|
+
format.docstring-code-format = true
|
|
71
|
+
lint.select = [ "ALL" ]
|
|
72
|
+
lint.ignore = [
|
|
73
|
+
"COM812", # conflicts with the formatter
|
|
74
|
+
"CPY001", # no per-file copyright headers; LICENSE covers the project
|
|
75
|
+
"D105", # magic methods document themselves
|
|
76
|
+
"D107", # __init__ is documented on the class
|
|
77
|
+
]
|
|
78
|
+
lint.per-file-ignores."docs/conf.py" = [ "A001", "D", "INP001" ]
|
|
79
|
+
lint.per-file-ignores."scripts/**" = [ "D", "INP001", "S", "T201" ]
|
|
80
|
+
# The sync package is generated from async code, where `yield from` does not exist.
|
|
81
|
+
lint.per-file-ignores."src/wow/_sync/**" = [ "UP028" ]
|
|
82
|
+
lint.per-file-ignores."tests/**" = [ "ANN", "ARG001", "D", "PLR2004", "S101", "S105", "S106", "SLF001" ]
|
|
83
|
+
lint.flake8-tidy-imports.banned-api."__future__.annotations".msg = """\
|
|
84
|
+
Python 3.14 evaluates annotations lazily (PEP 649); drop this import.\
|
|
85
|
+
"""
|
|
86
|
+
lint.flake8-type-checking.runtime-evaluated-base-classes = [
|
|
87
|
+
"msgspec.Struct",
|
|
88
|
+
"wow.models._common.Document",
|
|
89
|
+
"wow.models._common.Model",
|
|
90
|
+
]
|
|
91
|
+
lint.isort.known-first-party = [ "wow" ]
|
|
92
|
+
lint.pydocstyle.convention = "google"
|
|
93
|
+
lint.pylint.max-args = 10
|
|
94
|
+
|
|
95
|
+
[tool.codespell]
|
|
96
|
+
skip = "uv.lock,pyrefly-baseline.json,./tests/fixtures,./docs/_build,./.venv,./htmlcov,./dist"
|
|
97
|
+
|
|
98
|
+
[tool.pyrefly]
|
|
99
|
+
python-version = "3.14"
|
|
100
|
+
project-includes = [ "docs/conf.py", "scripts", "src", "tests" ]
|
|
101
|
+
search-path = [ "src", "." ]
|
|
102
|
+
# Accepted errors live here and new ones fail CI; regenerate with `make type-baseline`.
|
|
103
|
+
baseline = "pyrefly-baseline.json"
|
|
104
|
+
preset = "strict"
|
|
105
|
+
|
|
106
|
+
[tool.pytest]
|
|
107
|
+
addopts = [ "--strict-markers", "--strict-config", "-ra" ]
|
|
108
|
+
filterwarnings = [ "error" ]
|
|
109
|
+
testpaths = [ "tests" ]
|
|
110
|
+
xfail_strict = true
|
|
111
|
+
|
|
112
|
+
[tool.coverage]
|
|
113
|
+
run.source = [ "wow" ]
|
|
114
|
+
run.branch = true
|
|
115
|
+
report.fail_under = 100
|
|
116
|
+
report.exclude_also = [ "if TYPE_CHECKING:" ]
|
|
117
|
+
report.skip_covered = true
|
|
118
|
+
report.show_missing = true
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"""Typed sync and async client for the World of Warcraft: Forever Battle.net API.
|
|
2
|
+
|
|
3
|
+
>>> from wow import Client
|
|
4
|
+
>>> with Client(client_id="...", client_secret="...") as client: # doctest: +SKIP
|
|
5
|
+
... client.playable_classes.get(1).name
|
|
6
|
+
'Warrior'
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from wow._async._client import AsyncClient
|
|
10
|
+
from wow._base import OAuthToken
|
|
11
|
+
from wow._exceptions import (
|
|
12
|
+
APIConnectionError,
|
|
13
|
+
APIError,
|
|
14
|
+
APIResponseValidationError,
|
|
15
|
+
APIStatusError,
|
|
16
|
+
APITimeoutError,
|
|
17
|
+
AuthenticationError,
|
|
18
|
+
BadRequestError,
|
|
19
|
+
InternalServerError,
|
|
20
|
+
NotFoundError,
|
|
21
|
+
PermissionDeniedError,
|
|
22
|
+
RateLimitError,
|
|
23
|
+
WowError,
|
|
24
|
+
)
|
|
25
|
+
from wow._response import APIResponse
|
|
26
|
+
from wow._sync._client import Client
|
|
27
|
+
from wow._types import Locale, NamespaceKind, Region
|
|
28
|
+
from wow.search import Not, Range
|
|
29
|
+
|
|
30
|
+
__all__ = [
|
|
31
|
+
"APIConnectionError",
|
|
32
|
+
"APIError",
|
|
33
|
+
"APIResponse",
|
|
34
|
+
"APIResponseValidationError",
|
|
35
|
+
"APIStatusError",
|
|
36
|
+
"APITimeoutError",
|
|
37
|
+
"AsyncClient",
|
|
38
|
+
"AuthenticationError",
|
|
39
|
+
"BadRequestError",
|
|
40
|
+
"Client",
|
|
41
|
+
"InternalServerError",
|
|
42
|
+
"Locale",
|
|
43
|
+
"NamespaceKind",
|
|
44
|
+
"Not",
|
|
45
|
+
"NotFoundError",
|
|
46
|
+
"OAuthToken",
|
|
47
|
+
"PermissionDeniedError",
|
|
48
|
+
"Range",
|
|
49
|
+
"RateLimitError",
|
|
50
|
+
"Region",
|
|
51
|
+
"WowError",
|
|
52
|
+
]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""The client implementation."""
|