Add API for coordinates, random, search, and geosearch#504
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #504 +/- ##
==========================================
- Coverage 97.16% 94.21% -2.96%
==========================================
Files 14 17 +3
Lines 1201 2421 +1220
==========================================
+ Hits 1167 2281 +1114
- Misses 34 140 +106 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This was referenced Mar 27, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This major update introduces strongly-typed enum parameters throughout the Wikipedia-API library, providing enhanced type safety while maintaining full backward compatibility. The implementation adds comprehensive enum support for all API string parameters, new query submodules (coordinates, geosearch, random, search), and extensive documentation improvements.
Key Features Added
🎯 Type-Safe Enum Parameters
SearchProp,SearchInfo,SearchWhat,SearchQiProfile,SearchSortGeoSearchSort,Globe,CoordinateType,CoordinatesPropRedirectFilter,Direction🚀 New Query Submodules
📚 Comprehensive Documentation
🔧 Enhanced Type System
GeoPoint,Coordinate,SearchResults)Benefits
✅ Type Safety & Developer Experience
✅ Backward Compatibility
✅ Performance & Reliability
Usage Examples
Type-Safe Enum Usage (Recommended)
Backward-Compatible String Usage (Still Works)
Batch Operations
Technical Implementation
🏗️ Architecture Updates
_dispatch_standalone_listfor page-independent queries📦 New Modules
wikipediaapi/_enums.py: All enum definitions and converterswikipediaapi/_params.py: Parameter dataclasses and validationwikipediaapi/_types.py: Typed data structureswikipediaapi/_pages_dict.py: Batch operation support🧪 Testing & Quality
Migration Guide
For Library Users
For Library Developers
Wiki*type aliases in function signaturesFiles Changed