A full-functionality wrapper for the https://ballchasing.com API
Project description
A full-functionality wrapper for the https://ballchasing.com API.
Install
pip install pychasing
pychasing.Client
The main object used to interact with the API. Has the below methods:
ping
- pings the ballchasing servers.upload_replay
- uploads a replay to the token-holder's account.- NOTE: this takes a
BinaryIO
object. For example:
with open("my_replay.replay", "rb") as replay_file: ...upload_replay(replay_file, ...)
- NOTE: this takes a
list_replays
- list replays (basic information only) filtered on various criteria.get_replay
- get the in-depth information of a specific replay.delete_replay
- delete a specific replay, so long as it is owned by the token-holder.- NOTE: this operation is permenant and cannot be undone.
patch_replay
- edit thetitle
,visibility
or parentgroup
of a specific replay.download_replay
- download the raw bytes of a specific replay, so long as it is not private (unless it is owned by the token-holder).- NOTE: since replays are relatively large, they should be downloaded in chunks. For example:
with ...download_replay(...) as data_stream: with open("my_replay.replay", "wb") as replay_file: for chunk in data_stream.iter_content(chunk_size=4096): replay_file.write(chunk)
create_group
- create a replay group.list_groups
- list groups (basic information only) filtered on various criteria.get_group
- get in-depth information of a specific replay group.delete_group
- delete a specific group, so long as it is owned by the token-holder.- NOTE: this operation is permenant and cannot be undone.
patch_group
edit theplayer-identification
,team-identification
,parent
, orshared
status of a specific replay group, so long as it owned by the token-holder.maps
- list all the maps in the game.get_threejs
- get basic locational data (among other data) of a specific replay.- NOTE: this functionality is highly experimental. It accesses a back-end API used for populating site data (that notably does not require authorization headers). At any time, this API could become restricted or its functionality could change.
get_timeline
- get basic timeline data of a specific replay.- NOTE: this functionality is highly experimental. It accesses a back-end API used for populating site data (that notably does not require authorization headers). At any time, this API could become restricted or its functionality could change.
export_csv
- get group statistics formatted as semi-colon-separated values.
Helper types
pychasing.types.Rank
Represents an in-game rank (Unranked
to SSL
).
pychasing.types.Playlist
Represents an in-game playlist, e.g. Hoops
, Rumble
, Ranked Duels
.
pychasing.types.Platform
Represents the current playable platforms (Steam
, Epic
, XBox
, PlayStation
, Switch
).
pychasing.types.Map
Represents an in-game map, e.g. Starbase Arc
, arc_p
.
pychasing.types.PatreonTier
Represents a patreon tier for ballchasing
's patreon. Tiers include GrandChampion
, Champion
, Diamond
, Gold
, and ``Regular` (no patreon tier).
pychasing.types.Visibility
Represents the visibility of a replay or group, i.e. public
, unlisted
, and private
.
pychasing.types.PlayerIdentification
Represents a type of player identification for groups, i.e. by id
and by name
.
pychasing.types.TeamIdentification
Represents a type of team identification for groups, i.e. by distinct players
and by player clusters
.
pychasing.types.MatchResult
Represents a result of a match, i.e. win
or loss
pychasing.types.SortBy
Represents a sorting method, e.g. replay date
, group creation date
, group name
.
pychasing.types.SortDir
Represents a sort direction, i.e. ascending
and descending
.
pychasing.types.GroupStats
Represents a stat group when exporting CSV, e.g. players
, teams
.
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 pychasing-0.0.1.tar.gz
.
File metadata
- Download URL: pychasing-0.0.1.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d95c72448695263178dee66697eff6e01a714ff3f7f1c6169e502e14b645ea9d |
|
MD5 | 9e834a0377f5304aa299a516c5019345 |
|
BLAKE2b-256 | 3a2ac7ff52d1fc437627a3c0e4a5baf807fa0e6cbb8925edfdab48bb6fc42625 |
File details
Details for the file pychasing-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: pychasing-0.0.1-py3-none-any.whl
- Upload date:
- Size: 12.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0695b0119015b881a44e81d5ba9975ac454e57f96f9a3b4d5a1d1606bc3d64db |
|
MD5 | ebdd1b0e4b81780f34ec46f605e24220 |
|
BLAKE2b-256 | 1635a37341d7d01e42bf23c3400854acfefcc9767e3c0da88112ce93ee11267c |