localdex 0.1.7__py3-none-any.whl → 0.1.8__py3-none-any.whl
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.
- localdex/core.py +1 -1
- {localdex-0.1.7.dist-info → localdex-0.1.8.dist-info}/METADATA +2 -136
- {localdex-0.1.7.dist-info → localdex-0.1.8.dist-info}/RECORD +6 -6
- {localdex-0.1.7.dist-info → localdex-0.1.8.dist-info}/WHEEL +0 -0
- {localdex-0.1.7.dist-info → localdex-0.1.8.dist-info}/entry_points.txt +0 -0
- {localdex-0.1.7.dist-info → localdex-0.1.8.dist-info}/top_level.txt +0 -0
localdex/core.py
CHANGED
@@ -450,7 +450,7 @@ class LocalDex:
|
|
450
450
|
evo_item=data.get("evoItem"),
|
451
451
|
egg_groups=data.get("eggGroups"),
|
452
452
|
gender_ratio=data.get("genderRatio"),
|
453
|
-
generation=data.get("
|
453
|
+
generation=data.get("generation"),
|
454
454
|
description=data.get("description"),
|
455
455
|
is_legendary=data.get("isLegendary", False),
|
456
456
|
is_mythical=data.get("isMythical", False),
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: localdex
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.8
|
4
4
|
Summary: A local Pokemon data repository/Pokedex with fast offline access
|
5
5
|
Home-page: https://github.com/yourusername/localdex
|
6
6
|
Author: LocalDex Team
|
@@ -59,7 +59,7 @@ A fast, offline-first Python library for Pokemon data access. LocalDex provides
|
|
59
59
|
[](https://badge.fury.io/py/localdex)
|
60
60
|
[](https://pypi.org/project/localdex/)
|
61
61
|
[](https://opensource.org/licenses/MIT)
|
62
|
-
[](https://github.com/colefoster/localdex/actions/workflows/release.yml)
|
63
63
|
|
64
64
|
## Features
|
65
65
|
|
@@ -102,31 +102,6 @@ pip install localdex[abilities] # Ability data
|
|
102
102
|
pip install localdex[full]
|
103
103
|
```
|
104
104
|
|
105
|
-
### Development Installation
|
106
|
-
|
107
|
-
```bash
|
108
|
-
git clone https://github.com/yourusername/localdex.git
|
109
|
-
cd localdex
|
110
|
-
pip install -e .[dev]
|
111
|
-
```
|
112
|
-
|
113
|
-
## Development & Automation
|
114
|
-
|
115
|
-
This project uses GitHub Actions for automated testing, data updates, and PyPI releases. See [GITHUB_ACTIONS_SETUP.md](GITHUB_ACTIONS_SETUP.md) for detailed setup instructions.
|
116
|
-
|
117
|
-
### Quick Setup for Contributors
|
118
|
-
|
119
|
-
1. **Fork and clone** the repository
|
120
|
-
2. **Install dependencies**: `pip install -e .[dev]`
|
121
|
-
3. **Run tests**: `pytest`
|
122
|
-
4. **Update data**: `python -m localdex.download_data`
|
123
|
-
5. **Create pull request**
|
124
|
-
|
125
|
-
### Automated Workflows
|
126
|
-
|
127
|
-
- **Test**: Runs on every PR and push to main
|
128
|
-
- **Data Updates**: Weekly automated Pokemon data updates
|
129
|
-
- **Release**: Automated PyPI releases on version tags
|
130
105
|
|
131
106
|
## Quick Start
|
132
107
|
|
@@ -268,89 +243,6 @@ LocalDex organizes data into logical sets that can be installed independently:
|
|
268
243
|
- **Items** (`items`): Item data and effects
|
269
244
|
- **Abilities** (`abilities`): Detailed ability information
|
270
245
|
|
271
|
-
## Examples
|
272
|
-
|
273
|
-
### Pokemon Battle Simulator
|
274
|
-
|
275
|
-
```python
|
276
|
-
from localdex import LocalDex
|
277
|
-
|
278
|
-
dex = LocalDex()
|
279
|
-
|
280
|
-
def simulate_battle(pokemon1_name: str, pokemon2_name: str):
|
281
|
-
pokemon1 = dex.get_pokemon(pokemon1_name)
|
282
|
-
pokemon2 = dex.get_pokemon(pokemon2_name)
|
283
|
-
|
284
|
-
print(f"{pokemon1.name} vs {pokemon2.name}")
|
285
|
-
print(f"{pokemon1.name} types: {pokemon1.types}")
|
286
|
-
print(f"{pokemon2.name} types: {pokemon2.types}")
|
287
|
-
|
288
|
-
# Calculate type effectiveness
|
289
|
-
for move in pokemon1.moves[:4]: # First 4 moves
|
290
|
-
effectiveness = calculate_effectiveness(move.type, pokemon2.types)
|
291
|
-
print(f"{move.name} effectiveness: {effectiveness}x")
|
292
|
-
|
293
|
-
simulate_battle("pikachu", "charizard")
|
294
|
-
```
|
295
|
-
|
296
|
-
### Pokemon Team Builder
|
297
|
-
|
298
|
-
```python
|
299
|
-
from localdex import LocalDex
|
300
|
-
|
301
|
-
dex = LocalDex()
|
302
|
-
|
303
|
-
def build_balanced_team():
|
304
|
-
team = []
|
305
|
-
|
306
|
-
# Get a water type
|
307
|
-
water_pokemon = dex.search_pokemon(type="Water", min_speed=80)
|
308
|
-
if water_pokemon:
|
309
|
-
team.append(water_pokemon[0])
|
310
|
-
|
311
|
-
# Get a fire type
|
312
|
-
fire_pokemon = dex.search_pokemon(type="Fire", min_attack=100)
|
313
|
-
if fire_pokemon:
|
314
|
-
team.append(fire_pokemon[0])
|
315
|
-
|
316
|
-
# Get a grass type
|
317
|
-
grass_pokemon = dex.search_pokemon(type="Grass", min_special_attack=90)
|
318
|
-
if grass_pokemon:
|
319
|
-
team.append(grass_pokemon[0])
|
320
|
-
|
321
|
-
return team
|
322
|
-
|
323
|
-
team = build_balanced_team()
|
324
|
-
for pokemon in team:
|
325
|
-
print(f"{pokemon.name} - {pokemon.types}")
|
326
|
-
```
|
327
|
-
|
328
|
-
### Move Database
|
329
|
-
|
330
|
-
```python
|
331
|
-
from localdex import LocalDex
|
332
|
-
|
333
|
-
dex = LocalDex()
|
334
|
-
|
335
|
-
def analyze_moves():
|
336
|
-
# Get all moves
|
337
|
-
all_moves = dex.get_all_moves()
|
338
|
-
|
339
|
-
# Find the strongest moves
|
340
|
-
strong_moves = [move for move in all_moves if move.base_power >= 120]
|
341
|
-
print(f"Strong moves (120+ power): {len(strong_moves)}")
|
342
|
-
|
343
|
-
# Find status moves
|
344
|
-
status_moves = [move for move in all_moves if move.category == "Status"]
|
345
|
-
print(f"Status moves: {len(status_moves)}")
|
346
|
-
|
347
|
-
# Find moves by type
|
348
|
-
fire_moves = [move for move in all_moves if move.type == "Fire"]
|
349
|
-
print(f"Fire moves: {len(fire_moves)}")
|
350
|
-
|
351
|
-
analyze_moves()
|
352
|
-
```
|
353
|
-
|
354
246
|
## CLI Usage
|
355
247
|
|
356
248
|
LocalDex includes a command-line interface for quick data access:
|
@@ -375,30 +267,6 @@ localdex list-pokemon
|
|
375
267
|
localdex export --format json --output pokemon_data.json
|
376
268
|
```
|
377
269
|
|
378
|
-
## Performance
|
379
|
-
|
380
|
-
LocalDex is optimized for fast access:
|
381
|
-
|
382
|
-
- **Memory Efficient**: Data is loaded on-demand
|
383
|
-
- **Fast Lookups**: Optimized data structures for quick searches
|
384
|
-
- **Caching**: Frequently accessed data is cached in memory
|
385
|
-
- **Indexed Searches**: Pre-built indexes for common search patterns
|
386
|
-
|
387
|
-
## Contributing
|
388
|
-
|
389
|
-
Contributions are welcome! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
|
390
|
-
|
391
|
-
### Development Setup
|
392
|
-
|
393
|
-
```bash
|
394
|
-
git clone https://github.com/yourusername/localdex.git
|
395
|
-
cd localdex
|
396
|
-
pip install -e .[dev]
|
397
|
-
pytest # Run tests
|
398
|
-
black . # Format code
|
399
|
-
mypy . # Type checking
|
400
|
-
```
|
401
|
-
|
402
270
|
## License
|
403
271
|
|
404
272
|
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
@@ -409,6 +277,4 @@ LocalDex uses data from:
|
|
409
277
|
- [Pokemon Showdown](https://github.com/smogon/pokemon-showdown)
|
410
278
|
- [PokeAPI](https://pokeapi.co/) (for initial data collection)
|
411
279
|
|
412
|
-
## Changelog
|
413
280
|
|
414
|
-
See [CHANGELOG.md](CHANGELOG.md) for a list of changes and version history.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
localdex/__init__.py,sha256=rAVSDHi5KVKNiMaKgZZ04_Kl7j2KPCZuWO7OuDU6id8,748
|
2
2
|
localdex/cli.py,sha256=WqBCyA0akAFJNrYa8jCA3zoZgYEptDYDMGfAGkvKyZc,19317
|
3
|
-
localdex/core.py,sha256=
|
3
|
+
localdex/core.py,sha256=9sLLrT60mMtPYVg5ybRRteIFnw3nkj4-XMLhlfLC2jo,20891
|
4
4
|
localdex/data_loader.py,sha256=hi9aSTto5Ti-OBGOgrQ-XwD5hmivsUwS1uC4rulhwQI,11366
|
5
5
|
localdex/download_data.py,sha256=ibAHDxL60sV4LVN9isCmf8vvd_aI9IQbyjJpU0FHGUo,18869
|
6
6
|
localdex/exceptions.py,sha256=Z02-8Kci6jFDk2nnGdVSHZJMDDWE9vuwuASs4VM3To8,2777
|
@@ -4790,8 +4790,8 @@ localdex/models/ability.py,sha256=AQzv3XUHHl4sustMJjPDDjJOjXu2GMLTfcM3-tqQ_1w,30
|
|
4790
4790
|
localdex/models/item.py,sha256=zXao8F-jBPUGq_YLeGeYeK_dZVI7aZMXtWOPwR3qusY,4677
|
4791
4791
|
localdex/models/move.py,sha256=hfgcWI4ziz5MMvc9ddmkotxzYYdrSUqZZQ72IU5tucs,7629
|
4792
4792
|
localdex/models/pokemon.py,sha256=v5zkxY1NGGR-MczFCZe9fHt6u_BAqAjMiQZlpcLXVGc,5408
|
4793
|
-
localdex-0.1.
|
4794
|
-
localdex-0.1.
|
4795
|
-
localdex-0.1.
|
4796
|
-
localdex-0.1.
|
4797
|
-
localdex-0.1.
|
4793
|
+
localdex-0.1.8.dist-info/METADATA,sha256=cgxNvLj3bLSU7lQY488Z1QcuvHfJhGzrx790kt4oTQY,8332
|
4794
|
+
localdex-0.1.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
4795
|
+
localdex-0.1.8.dist-info/entry_points.txt,sha256=n5GxSeQo-MRuvrT2wVk7hOzEFFsWf6tkBjkzmGIYJe4,47
|
4796
|
+
localdex-0.1.8.dist-info/top_level.txt,sha256=vtupDMH-IaxVCoEZrmE0QzdTwhaKzngVJbTA1NkR_MY,9
|
4797
|
+
localdex-0.1.8.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|