Overfast API wrapper for Python
Project description
overfast-api
Python wrapper for the Overfast API
Features
- Access to all endpoints of the Overfast API
- Data returned as easy to use custom classes
- Ability to set optional parameters for all endpoints
Usage
Install via pip
pip install overfast-api
Player Examples
Example look up summary of specific player (requires full battle.net id)
from overfast_api import Players
# Create an instance of the Players class
players = Players()
# Note: replace hash mark in player name with hyphen when looking up players by id
my_summary = players.get_player_summary(username="redjordan-1382")
print(f'{my_summary.username}\n{my_summary.title}\nEndorsement Level: {my_summary.endorsement_level}')
Result:
redjordan
Hashimoto Goon
Endorsement Level: 5
Example search for all users with in-game username
from overfast_api import Players
players = Players()
# Search for all players the in-game name "sourdough"
results = players.player_search(username="sourdough")
for player in results:
print(f'{player.name}\tTitle: {player.title}')
Result:
SourDough#11454 Title: Demigod
SourDough#11463 Title: None
SourDough#11713 Title: Stalwart Hero
SourDough#11835 Title: Mercy's Angel
SourDough#11967 Title: None
Sourdough#11204 Title: Eldritch Nightmare
Sourdough#11216 Title: Mortal
...
More examples will be added soon
Hero Examples
Endpoint information
For information on what data the endpoints return and optional parameters available please check out the Overfast API docs (https://overfast-api.tekrop.fr/)
Roadmap
- Class methods to convert custom classes to different default python types i.e. dict, list etc
- Additional documentation in source code
- Example files showing more complex usage
- Option to use self-hosted or unofficial host of Overfast API
Rate Limiting
Currently, this wrapper is hardcoded to use the official Overfast API hosted by TeKrop. As such please note that usage of this wrapper is limited by the rate limits set by TeKrop.
Current rate limits are 30 requests/second shared across all endpoints.
Credits
All data provided by TeKrop's Overfast API (https://overfast-api.tekrop.fr/)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for overfast_api-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f912d0b309143a2d8dfb92cadb42f323b5446ee9c28134cd8dbcd3948d490db6 |
|
MD5 | 42213a87ec9d08a44ac53372e3da592e |
|
BLAKE2b-256 | a958bd7984d00cf592cc882578374785a3f3bf637f38233927d51a6e89fa9d0c |