Unofficial Python API client for the ballchasing.com API.
Project description
ballchaser ⚽️🚗
Unofficial Python API client for the ballchasing.com API.
Usage
pip install ballchaser
All API requests are exposed via the BallChaser
class which is initialised with a ballchasing.com API token.
import os
from ballchaser.client import BallChaser
ball_chaser = BallChaser(os.getenv("BALLCHASING_API_TOKEN"))
# search and retrieve replay metadata
replays = [
replay
for replay in ball_chaser.list_replays(player_name="GarrettG", replay_count=10)
]
# retrieve replay statistics
replay_stats = [
ball_chaser.get_replay(replay["id"])
for replay in replays
]
API requests can automatically be retried if they return a rate limit response by specifying backoff=True
. Requests
will be tried up to max_tries
times with exponential backoff between subsequent retries, e.g.
import os
from ballchaser.client import BallChaser
ball_chaser = BallChaser(os.getenv("BALLCHASING_API_TOKEN"), backoff=True, max_tries=5)
Contributing & Feedback
If there are any new features you'd like, or you encounter a bug, you can contribute by opening an issue or submitting a pull request.
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
File details
Details for the file ballchaser-0.7.0.tar.gz
.
File metadata
- Download URL: ballchaser-0.7.0.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.10.4 Linux/5.13.0-1021-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 522ce707baffcac8683131d445ff101fb8a2846e19678f5bd797d6bf0944840d |
|
MD5 | 7f78a9ed6d95d58c673006f16a2cdbba |
|
BLAKE2b-256 | babe91caa72298dfc8db75da99679dd95f541d51a080e364862fcb3ecf07aee2 |
File details
Details for the file ballchaser-0.7.0-py3-none-any.whl
.
File metadata
- Download URL: ballchaser-0.7.0-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.10.4 Linux/5.13.0-1021-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57de7806b5b41f4b85c683eaa570532a33bd6e1c903e0fad97885c28b08b48f0 |
|
MD5 | d5fbc599fdfa7d872b0c2f12c20713a2 |
|
BLAKE2b-256 | 7f6457ffa7fced20850bc2774d23baf5798b937dd622225b04f7bb474953f5ba |