Skip to main content

Python Ballchasing

An easy-to-use and comprehensive Python wrapper for the ballchasing.com API.

Installation

You can install the library from PyPI using pip:

pip install python-ballchasing

Authentication

Before you can use the library, you need an API authentication key from ballchasing.com.

  1. Log in to ballchasing.com.
  2. Navigate to the Upload tab.
  3. Create an API key and copy it.

Keep your API key secure and do not share it publicly.

API

For detailed information, please refer to the docs inside the code. For the most part it follows the API spec closely, but there are some differences.

The API is exposed via the BallchasingApi class.

Making the client:

from ballchasing import BallchasingApi
api = BallchasingApi("Your token here")

or equivalently

import ballchasing
api = ballchasing.Api("Your token here")

By default this will also ping the API to make sure it's working.


Some simple examples:

# Get lots of SSL replays

from ballchasing import Rank  # there's also Playlist, Season, Map, and more

replays = api.get_replays(
  min_rank=Rank.SUPERSONIC_LEGEND,
  count=10_000  # The API limits you to 200 replays per request but the library handles this for you
)

for replay in replays:  # (replays is an iterable so you don't need to wait for all the replays to be collected)
  ...  # Do something with the replays
# Get a specific replay with more detail than the iterator (including stats!)
replay = api.get_replay("2627e02a-aa46-4e13-b66b-b76a32069a07")
# Get groups by the "RLCS Referee" account
groups = api.get_groups(creator="76561199225615730")

for group in groups:
  # Download the group
  api.download_group(
    group_id=group["id"],
    path="/path/to/destination/"
    recursive=True,  # To download all the replays and retain the group structure with subfolders
  )

  # Get replays from the group
  replays = get_group_replays(
    group_id=group["id"],
    deep=True,  # To get detailed replay info
  )
  for replay in replays:
    api.download_replay(replay_id=replay["id"], path="/path/to/destination/")  # You could also download like this

Additionally, there's the option to put responses (replays, groups) into typed objects for better type hinting and validation. It also attempts to fill in missing variables not returned by ballchasing (e.g. if a team has 0 goals they won't have a "goal" entry in the response) The classes can also be found under the typing folder and used as a reference for what the API returns.

# When creating the API, you can specify a default setting for typing (defaults to False)
api = ballchasing.Api("Your token here", typed=True)

# or you can specify it explicitly
replay = api.get_replay("2627e02a-aa46-4e13-b66b-b76a32069a07", typed=True)
print(replay.blue.players[0].name)  # Example of easy attribute access

group = api.get_group("g2-vs-bds-hwbf2eyolb", typed=True)
print(group.players[0].name)

Release files for python-ballchasing 0.5.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python-ballchasing 0.5.2
File Size Uploaded
python_ballchasing-0.5.2.tar.gz 34.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for python-ballchasing 0.5.2
File Interpreter ABI Platform
python_ballchasing-0.5.2-py3-none-any.whl Python 3 none any Details

Total release size: 73.2 kB

Release files / python_ballchasing-0.5.2.tar.gz

Download URL python_ballchasing-0.5.2.tar.gz
Size 34.0 kB
Tags Source
SHA-256 checksum
How to use checksums
2f9a1c611fe061821f73a05a9ec4e689f3ec1affbb487b782772818dc5246ec8
BLAKE2b-256 checksum
How to use checksums
e76bbee1ebc21ee05fb079e6a6d7ac56e3761fe7101545994c677a4a76f409f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 23, 2026.

Transparency log

Release files / python_ballchasing-0.5.2-py3-none-any.whl

Download URL python_ballchasing-0.5.2-py3-none-any.whl
Size 39.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3500464b932be592b7982b23350584370f84f6bd1f683c4d985c53c30aa74c6c
BLAKE2b-256 checksum
How to use checksums
2c0aa9f6c537c0df7de24e983f4d7715798ebbe6e5a6b26e47025472ed75d522
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 23, 2026.

Transparency log

Release history Release notifications | RSS feed

0.5.4

2 release files

0.5.3

2 release files

This release

0.5.2 This release

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.22

1 release file

0.1.21

1 release file

0.1.20

1 release file

0.1.19

1 release file

0.1.18

1 release file

0.1.17

1 release file

0.1.16

1 release file

0.1.15

1 release file

0.1.14

1 release file

0.1.13

1 release file

0.1.12

1 release file

0.1.11

1 release file

0.1.10

1 release file

0.1.9

1 release file

0.1.8

1 release file

0.1.7

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page