Skip to main content

A simple and pythonic system to store, retrieve, and analyze Rocket League replay stats as returned from ballchasing.com's API

Project description

Install

pip install rlstatsdb

Description

rlstatsdb is a simple and easy-to-implement SQLite database manager equipped for storing and fetching Rocket League replay data (as returned from ballchasing.com's API). When fetching data from the database (through the manager) is incredibly easy to navigate, meaning you don't need to memorize the entire dictionary structure of ballchasing's get-replay response.

Usage

For the below example, replay_data is the response dict from https://ballchasing.com/api/replays/<replay_id>. In reality, this can be acquired through various means, such as requests and aiohttp, or through API wrappers such as pychasing and python-ballchasing.

import rlstatsdb

# The database file needs to either be non-existant, empty, or a valid
# SQLite database. If the file is non-existant, a new file will be created
sdb = rlstatsdb.Manager("path_to_database_file")

manifest_id = sdb.add(replay_data)
game = sdb.get(manifest_id)

game.replay_id
game.max_rank.division
game.orange.players[0].stats.core.goals
game.blue.color
# etc.

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

rlstatsdb-0.0.4.tar.gz (10.7 kB view hashes)

Uploaded Source

Built Distribution

rlstatsdb-0.0.4-py3-none-any.whl (11.6 kB view hashes)

Uploaded Python 3

Supported by

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