Skip to main content

A Python parser for tagpro.eu matches

Project description

Description

This package provides an easy interface for reading match files downloaded from the stat-collection website tagpro.eu (by Ronding). Uses of this include, but are not limited to:

  • Collecting individual players’ stats from matches

  • Pretty-printing the outcome of matches

  • Outputting full match timelines

  • Statistical analysis of TagPro matches

  • Rendering maps

Installation

Install using pip (python 3.6+):

pip install tagpro-eu

Install from source:

git clone git@github.com:arfie/tagpro-eu-python.git
cd tagpro-eu-python
sudo python3 setup.py install
# or:  python3 setup.py install --user
# to install for current user only

Quick Start

>>> import tagpro_eu

Download an online match with ID 1743331. Instead of the ID, a match URL or raw data URL can also be given.

>>> match = tagpro_eu.download_match(1743331)
>>> match
Match(server='tagpro-radius.koalabeast.com', port=8003)

Find out basic match information:

>>> match.date
datetime.datetime(2018, 1, 19, 3, 47, 26)

Find out match results:

>>> (match.team_red.score, match.team_blue.score)
(1, 3)

Look up players:

>>> match.players[7]
Player(name='LiddiLidd')

Read player stats. Time values are automatically formatted, but are internally just integers representing a number of frames (1/60 of a second).

>>> match.players[7].stats.captures
2
>>> match.players[7].stats.hold
00:58.12

Access the match’s map:

>>> match.map
Map(name='Constriction')
>>> (match.map.width, match.map.height)
(59, 25)

Read the map tiles as a 2D array:

>>> match.map.tiles[20][8]
<Tile.flag_red: 30>

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

tagpro-eu-1.1.2.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tagpro_eu-1.1.2-py3-none-any.whl (31.6 kB view details)

Uploaded Python 3

File details

Details for the file tagpro-eu-1.1.2.tar.gz.

File metadata

  • Download URL: tagpro-eu-1.1.2.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for tagpro-eu-1.1.2.tar.gz
Algorithm Hash digest
SHA256 4266e172f59e52c15adfdb284bee176cd9c767710ce0da8a82bc1ad1bda5d6e8
MD5 e1ea12854dc00d4ed9daa378a7d5fcdb
BLAKE2b-256 8949b1faa3eefcd820ce966f7fe331795ba562b0b242e20de3519cbfa388f4f5

See more details on using hashes here.

File details

Details for the file tagpro_eu-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: tagpro_eu-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 31.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for tagpro_eu-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0fa5db5b8a2bf72f165a8408f2ce82f37022f533927df4a3a22eeefdbf027ae2
MD5 fb7aee1c6e5a5497c6cd3116a709dc7c
BLAKE2b-256 0ae93bf50ebf7edb78e551e34add04f4835ef305cb2b0ef4189e4880abd4348b

See more details on using hashes here.

Supported by

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