endfield-py 1.0.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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 sora
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.
@@ -0,0 +1,267 @@
1
+ Metadata-Version: 2.4
2
+ Name: endfield-py
3
+ Version: 1.0.0
4
+ Summary: A Python library for fetching player data from the Enka Network API.
5
+ Author-email: sora <sahikast07@gmail.com>
6
+ License: MIT License
7
+
8
+ Copyright (c) 2026 sora
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Description-Content-Type: text/markdown
29
+ License-File: LICENSE.txt
30
+ Requires-Dist: aiohttp>=3.8.0
31
+ Requires-Dist: pydantic>=2.0.0
32
+ Requires-Dist: asyncio
33
+ Dynamic: license-file
34
+
35
+ # Endfield
36
+
37
+ A Python library for fetching and parsing player data from the Enka Network API for **Endfield**.
38
+
39
+ [![PyPI version](https://img.shields.io/pypi/v/endfield-py.svg)](https://pypi.org/project/endfield-py/)
40
+ [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE.txt)
41
+
42
+ ## Overview
43
+
44
+ **Endfield** is an async Python library that provides easy access to player game data from the Enka Network API. It allows developers to retrieve comprehensive information about players, their characters, weapons, equipment, and computed statistics.
45
+
46
+ ## Features
47
+
48
+ - **Async Support**: Built with asyncio for efficient concurrent requests
49
+ - **Complete Data Models**: Pydantic-based models for type-safe data handling
50
+ - **Player Showcase Data**: Fetch player profiles and their character showcases
51
+ - **Character Information**: Get detailed character data including skills, talents, and stats
52
+ - **Equipment & Weapons**: Access equipment and weapon information
53
+ - **Stat Computation**: Calculate final character statistics with modifiers
54
+ - **Asset Resolution**: Built-in asset resolution with local JSON data
55
+ - **Update Checking**: Check for and download library updates
56
+ - **Session Management**: Flexible session handling with context managers
57
+
58
+ ## Installation
59
+
60
+ ### From PyPI
61
+
62
+ ```bash
63
+ pip install endfield-py
64
+ ```
65
+
66
+ ### From GitHub
67
+
68
+ ```bash
69
+ pip install git+https://github.com/MR-LORD-REX/endfield.git
70
+ ```
71
+
72
+ ### Manual Installation
73
+
74
+ ```bash
75
+ git clone https://github.com/MR-LORD-REX/endfield.git
76
+ cd endfield
77
+ pip install -e .
78
+ ```
79
+
80
+ ## Requirements
81
+
82
+ - Python 3.8+
83
+ - aiohttp >= 3.8.0
84
+ - pydantic >= 2.0.0
85
+
86
+ ## Quick Start
87
+
88
+ ### Basic Usage
89
+
90
+ ```python
91
+ import asyncio
92
+ from endfield import Endfield
93
+
94
+ async def main():
95
+ async with Endfield() as client:
96
+ # Fetch player showcase data
97
+ showcase = await client.get_showcase(uid=4225399080)
98
+ print(showcase)
99
+
100
+ asyncio.run(main())
101
+ ```
102
+
103
+
104
+ ### Enable Debug Logging
105
+
106
+ ```python
107
+ async with Endfield(debug=True) as client:
108
+ showcase = await client.get_showcase(uid=4225399080)
109
+ ```
110
+
111
+ ## API Reference
112
+
113
+ ### Endfield Client
114
+
115
+ #### Constructor
116
+
117
+ ```python
118
+ Endfield(
119
+ session: Optional[aiohttp.ClientSession] = None,
120
+ debug: bool = False
121
+ )
122
+ ```
123
+
124
+ **Parameters:**
125
+
126
+ - `session`: Optional external aiohttp session
127
+ - `debug`: Enable debug logging (default: False)
128
+
129
+ #### Methods
130
+
131
+ ##### `get_showcase(uid: int | str)`
132
+
133
+ Fetch player showcase data including characters, equipment, and weapons.
134
+
135
+ ```python
136
+ showcase = await client.get_showcase(uid=4225399080)
137
+ ```
138
+
139
+ **Returns:** `ShowcaseData` - Player showcase information
140
+
141
+ ##### `check_for_updates()`
142
+
143
+ Check for library updates.
144
+
145
+ ```python
146
+ await client.check_for_updates()
147
+ ```
148
+
149
+ ##### `close()`
150
+
151
+ Close the client session.
152
+
153
+ ```python
154
+ await client.close()
155
+ ```
156
+
157
+ ## Data Models
158
+
159
+ The library provides comprehensive Pydantic models for type-safe data handling:
160
+
161
+ - **ShowcaseData**: Complete player showcase information
162
+ - **PlayerProfile**: Player account information
163
+ - **ProfileCharacter**: Character showcase data
164
+ - **CharacterData**: Detailed character information including skills and talents
165
+ - **WeaponData**: Weapon information and skills
166
+ - **EquipData**: Equipment data with stat modifiers
167
+ - **ComputedStats**: Final calculated character statistics
168
+
169
+ ## Examples
170
+
171
+ ### Fetch Player Profile
172
+
173
+ ```python
174
+ async with Endfield() as client:
175
+ showcase = await client.get_showcase(uid="your_uid_here")
176
+ profile = showcase.player_info
177
+ print(f"Player: {profile.player_name}")
178
+ print(f"Level: {profile.level}")
179
+ ```
180
+
181
+ ### Get Character Information
182
+
183
+ ```python
184
+ async with Endfield() as client:
185
+ showcase = await client.get_showcase(uid="your_uid_here")
186
+ for char in showcase.characters:
187
+ print(f"Character: {char.name}")
188
+ print(f"Level: {char.level}")
189
+ print(f"Stats: {char.stats}")
190
+ ```
191
+
192
+ ### Check Weapon Information
193
+
194
+ ```python
195
+ async with Endfield() as client:
196
+ showcase = await client.get_showcase(uid="your_uid_here")
197
+ for char in showcase.characters:
198
+ if char.weapon:
199
+ print(f"{char.name}'s Weapon: {char.weapon.name}")
200
+ print(f"Level: {char.weapon.level}")
201
+ ```
202
+
203
+ ## Error Handling
204
+
205
+ The library provides specific exceptions for error handling:
206
+
207
+ ```python
208
+ from endfield.errors import APIError, CharacterNotFoundError, WeaponNotFoundError
209
+
210
+ try:
211
+ async with Endfield() as client:
212
+ showcase = await client.get_showcase(uid="invalid_uid")
213
+ except APIError as e:
214
+ print(f"API Error: {e}")
215
+ except CharacterNotFoundError as e:
216
+ print(f"Character not found: {e}")
217
+ except WeaponNotFoundError as e:
218
+ print(f"Weapon not found: {e}")
219
+ ```
220
+
221
+
222
+ ## Contributing
223
+
224
+ Contributions are welcome! Please feel free to submit pull requests or open issues on the [GitHub repository](https://github.com/MR-LORD-REX/endfield).
225
+
226
+ ### Development Setup
227
+
228
+ ```bash
229
+ git clone https://github.com/MR-LORD-REX/endfield.git
230
+ cd endfield
231
+ pip install -e .
232
+ ```
233
+
234
+ ## License
235
+
236
+ This project is licensed under the MIT License - see the [LICENSE.txt](LICENSE.txt) file for details.
237
+
238
+ ## Disclaimer
239
+
240
+ This is an unofficial library. Endfield is a trademark of their respective owners. This library is not affiliated with or endorsed by the game developers. Use this library responsibly and in accordance with the Enka Network API terms of service.
241
+
242
+ ## Support
243
+
244
+ For issues, questions, or suggestions, please open an issue on the [GitHub repository](https://github.com/MR-LORD-REX/endfield/issues).
245
+
246
+ ## Credits
247
+
248
+ - Built by [MR-LORD-REX](https://github.com/MR-LORD-REX) , [telegram](https://t.me/The_Prime_Mover)
249
+ - Data source: [Enka Network](https://enka.network)
250
+
251
+ ## Changelog
252
+
253
+ ### Version 1.0.0
254
+
255
+ - Initial release
256
+ - Basic player data fetching
257
+ - Character, weapon, and equipment support
258
+ - Stat computation
259
+ - Update checking
260
+
261
+ ---
262
+
263
+ ## NOTE
264
+
265
+ - Computation of final character stats are done by the currently known formulas, some of them might be inaccurate , feel free to contribute if you encounter any discrepancies or have suggestions for improvement.
266
+
267
+ **Happy Endfielding**
@@ -0,0 +1,233 @@
1
+ # Endfield
2
+
3
+ A Python library for fetching and parsing player data from the Enka Network API for **Endfield**.
4
+
5
+ [![PyPI version](https://img.shields.io/pypi/v/endfield-py.svg)](https://pypi.org/project/endfield-py/)
6
+ [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE.txt)
7
+
8
+ ## Overview
9
+
10
+ **Endfield** is an async Python library that provides easy access to player game data from the Enka Network API. It allows developers to retrieve comprehensive information about players, their characters, weapons, equipment, and computed statistics.
11
+
12
+ ## Features
13
+
14
+ - **Async Support**: Built with asyncio for efficient concurrent requests
15
+ - **Complete Data Models**: Pydantic-based models for type-safe data handling
16
+ - **Player Showcase Data**: Fetch player profiles and their character showcases
17
+ - **Character Information**: Get detailed character data including skills, talents, and stats
18
+ - **Equipment & Weapons**: Access equipment and weapon information
19
+ - **Stat Computation**: Calculate final character statistics with modifiers
20
+ - **Asset Resolution**: Built-in asset resolution with local JSON data
21
+ - **Update Checking**: Check for and download library updates
22
+ - **Session Management**: Flexible session handling with context managers
23
+
24
+ ## Installation
25
+
26
+ ### From PyPI
27
+
28
+ ```bash
29
+ pip install endfield-py
30
+ ```
31
+
32
+ ### From GitHub
33
+
34
+ ```bash
35
+ pip install git+https://github.com/MR-LORD-REX/endfield.git
36
+ ```
37
+
38
+ ### Manual Installation
39
+
40
+ ```bash
41
+ git clone https://github.com/MR-LORD-REX/endfield.git
42
+ cd endfield
43
+ pip install -e .
44
+ ```
45
+
46
+ ## Requirements
47
+
48
+ - Python 3.8+
49
+ - aiohttp >= 3.8.0
50
+ - pydantic >= 2.0.0
51
+
52
+ ## Quick Start
53
+
54
+ ### Basic Usage
55
+
56
+ ```python
57
+ import asyncio
58
+ from endfield import Endfield
59
+
60
+ async def main():
61
+ async with Endfield() as client:
62
+ # Fetch player showcase data
63
+ showcase = await client.get_showcase(uid=4225399080)
64
+ print(showcase)
65
+
66
+ asyncio.run(main())
67
+ ```
68
+
69
+
70
+ ### Enable Debug Logging
71
+
72
+ ```python
73
+ async with Endfield(debug=True) as client:
74
+ showcase = await client.get_showcase(uid=4225399080)
75
+ ```
76
+
77
+ ## API Reference
78
+
79
+ ### Endfield Client
80
+
81
+ #### Constructor
82
+
83
+ ```python
84
+ Endfield(
85
+ session: Optional[aiohttp.ClientSession] = None,
86
+ debug: bool = False
87
+ )
88
+ ```
89
+
90
+ **Parameters:**
91
+
92
+ - `session`: Optional external aiohttp session
93
+ - `debug`: Enable debug logging (default: False)
94
+
95
+ #### Methods
96
+
97
+ ##### `get_showcase(uid: int | str)`
98
+
99
+ Fetch player showcase data including characters, equipment, and weapons.
100
+
101
+ ```python
102
+ showcase = await client.get_showcase(uid=4225399080)
103
+ ```
104
+
105
+ **Returns:** `ShowcaseData` - Player showcase information
106
+
107
+ ##### `check_for_updates()`
108
+
109
+ Check for library updates.
110
+
111
+ ```python
112
+ await client.check_for_updates()
113
+ ```
114
+
115
+ ##### `close()`
116
+
117
+ Close the client session.
118
+
119
+ ```python
120
+ await client.close()
121
+ ```
122
+
123
+ ## Data Models
124
+
125
+ The library provides comprehensive Pydantic models for type-safe data handling:
126
+
127
+ - **ShowcaseData**: Complete player showcase information
128
+ - **PlayerProfile**: Player account information
129
+ - **ProfileCharacter**: Character showcase data
130
+ - **CharacterData**: Detailed character information including skills and talents
131
+ - **WeaponData**: Weapon information and skills
132
+ - **EquipData**: Equipment data with stat modifiers
133
+ - **ComputedStats**: Final calculated character statistics
134
+
135
+ ## Examples
136
+
137
+ ### Fetch Player Profile
138
+
139
+ ```python
140
+ async with Endfield() as client:
141
+ showcase = await client.get_showcase(uid="your_uid_here")
142
+ profile = showcase.player_info
143
+ print(f"Player: {profile.player_name}")
144
+ print(f"Level: {profile.level}")
145
+ ```
146
+
147
+ ### Get Character Information
148
+
149
+ ```python
150
+ async with Endfield() as client:
151
+ showcase = await client.get_showcase(uid="your_uid_here")
152
+ for char in showcase.characters:
153
+ print(f"Character: {char.name}")
154
+ print(f"Level: {char.level}")
155
+ print(f"Stats: {char.stats}")
156
+ ```
157
+
158
+ ### Check Weapon Information
159
+
160
+ ```python
161
+ async with Endfield() as client:
162
+ showcase = await client.get_showcase(uid="your_uid_here")
163
+ for char in showcase.characters:
164
+ if char.weapon:
165
+ print(f"{char.name}'s Weapon: {char.weapon.name}")
166
+ print(f"Level: {char.weapon.level}")
167
+ ```
168
+
169
+ ## Error Handling
170
+
171
+ The library provides specific exceptions for error handling:
172
+
173
+ ```python
174
+ from endfield.errors import APIError, CharacterNotFoundError, WeaponNotFoundError
175
+
176
+ try:
177
+ async with Endfield() as client:
178
+ showcase = await client.get_showcase(uid="invalid_uid")
179
+ except APIError as e:
180
+ print(f"API Error: {e}")
181
+ except CharacterNotFoundError as e:
182
+ print(f"Character not found: {e}")
183
+ except WeaponNotFoundError as e:
184
+ print(f"Weapon not found: {e}")
185
+ ```
186
+
187
+
188
+ ## Contributing
189
+
190
+ Contributions are welcome! Please feel free to submit pull requests or open issues on the [GitHub repository](https://github.com/MR-LORD-REX/endfield).
191
+
192
+ ### Development Setup
193
+
194
+ ```bash
195
+ git clone https://github.com/MR-LORD-REX/endfield.git
196
+ cd endfield
197
+ pip install -e .
198
+ ```
199
+
200
+ ## License
201
+
202
+ This project is licensed under the MIT License - see the [LICENSE.txt](LICENSE.txt) file for details.
203
+
204
+ ## Disclaimer
205
+
206
+ This is an unofficial library. Endfield is a trademark of their respective owners. This library is not affiliated with or endorsed by the game developers. Use this library responsibly and in accordance with the Enka Network API terms of service.
207
+
208
+ ## Support
209
+
210
+ For issues, questions, or suggestions, please open an issue on the [GitHub repository](https://github.com/MR-LORD-REX/endfield/issues).
211
+
212
+ ## Credits
213
+
214
+ - Built by [MR-LORD-REX](https://github.com/MR-LORD-REX) , [telegram](https://t.me/The_Prime_Mover)
215
+ - Data source: [Enka Network](https://enka.network)
216
+
217
+ ## Changelog
218
+
219
+ ### Version 1.0.0
220
+
221
+ - Initial release
222
+ - Basic player data fetching
223
+ - Character, weapon, and equipment support
224
+ - Stat computation
225
+ - Update checking
226
+
227
+ ---
228
+
229
+ ## NOTE
230
+
231
+ - Computation of final character stats are done by the currently known formulas, some of them might be inaccurate , feel free to contribute if you encounter any discrepancies or have suggestions for improvement.
232
+
233
+ **Happy Endfielding**
@@ -0,0 +1,21 @@
1
+ [build-system]
2
+ requires=["setuptools>=61.0"]
3
+ build-backend="setuptools.build_meta"
4
+
5
+ [project]
6
+ name="endfield-py"
7
+ version="1.0.0"
8
+ description="A Python library for fetching player data from the Enka Network API."
9
+ authors=[
10
+ {name="sora", email="sahikast07@gmail.com"}
11
+ ]
12
+ readme="README.md"
13
+ license={file="LICENSE.txt"}
14
+ dependencies=[
15
+ "aiohttp>=3.8.0",
16
+ "pydantic>=2.0.0",
17
+ "asyncio",
18
+ ]
19
+
20
+ [tool.setuptools.packages.find]
21
+ where = ["src"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,3 @@
1
+ from .client import Endfield
2
+
3
+ __all__ = ["Endfield"]