Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

overfast_api-1.0.0.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

overfast_api-1.0.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file overfast_api-1.0.0.tar.gz.

File metadata

  • Download URL: overfast_api-1.0.0.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for overfast_api-1.0.0.tar.gz
Algorithm Hash digest
SHA256 216d10c1545b7a4933d0d0f6be37c154527da2830ca6aadb280b72cf4c4222c3
MD5 1fb17b415d27503609dc61632ca8c7ac
BLAKE2b-256 5f0b4387d0d2c3fe2505790d6de4e0639dc2130476d989145cfdfb26a2da398d

See more details on using hashes here.

File details

Details for the file overfast_api-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: overfast_api-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for overfast_api-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f912d0b309143a2d8dfb92cadb42f323b5446ee9c28134cd8dbcd3948d490db6
MD5 42213a87ec9d08a44ac53372e3da592e
BLAKE2b-256 a958bd7984d00cf592cc882578374785a3f3bf637f38233927d51a6e89fa9d0c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page