Skip to main content

rustat-python-api

Python wrapper for the Rustat API

Example of usage:

  1. Install the package:
pip install rustat-python-api
  1. Usage:
from rustat_python_api import RuStatParser, DynamoLab, PitchControl

user = "your_login"
password = "your_password"

parser = RuStatParser(user, password)

info = parser.get_rpl_info()
keys = list(info.keys())
season_id, team_id = keys[-1], info[keys[-1]]["season_teams"][0]["id"]

schedule = parser.get_schedule(team_id, season_id)
keys = list(schedule.keys())
match_id = keys[-1]

events, subs = parser.get_events(match_id, process=True, return_subs=True)
stats = parser.get_match_stats(match_id)
tracking = parser.get_tracking(match_id)

host = "http://localhost:8001/"
client = DynamoLab(host)
client.run_model(
    model="xT",
    data=events,
    inplace=True,
    inplace_column=model
)

pc = PitchControl(tracking, events)
pc.draw_pitch_control(half=1, tp=100, save=True, filename="pitch_control")
# ffmpeg required for animation
pc.animate_pitch_control(half=1, tp=100, frames=30, filename="pitch_control")

Metadata

Release files for rustat-python-api 0.10.0

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

Built distribution (wheel)

Table of built distributions (wheels) for rustat-python-api 0.10.0
File Interpreter ABI Platform
rustat_python_api-0.10.0-py3-none-any.whl Python 3 none any Details

Release files / rustat_python_api-0.10.0-py3-none-any.whl

Download URL rustat_python_api-0.10.0-py3-none-any.whl
Size 28.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
663c46442486f4db3792c91fe9ab3115ed86d064bf7b54a7a9a6f587212cfd7d
BLAKE2b-256 checksum
How to use checksums
157984c2f5ab3d26bca92558b8507fe7982e0364a5f8d9aa0a7ffcfedd5c89a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.9

Security for rustat-python-api 0.10.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.10.0 This release

1 release file No provenance

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