Demolyzer is a statistics and data library for analyzing TF2 demo files. The main goal is to transform demo files into csv files and provide more downstream transformations to make it easier to analyze and plot data. After following the installation instructions below, basic usage is as follows:
from demolyzer.stats import DemoAnalyzer
my_demoanalyzer = DemoAnalyzer("path_to_my_demo.dem")
# see methods in `DemoAnalyzer` for more information..
my_demoanalyzer.players
my_demoanalyzer.num_players
death_stats = my_demoanalyzer.death_stats()
print(death_stats)
Python 3.10 or higher is required.
First, clone the repository and cd into it:
git clone https://github.com/MegaAntiCheat/demolyzer.git
cd demolyzer
Next, create a virtual environment:
python3 -m venv venv
Then activate it
On Unix and MacOS:
source venv/bin/activate
On Windows:
.\venv\Scripts\activate
For development, additional dependencies are needed:
pip install -e ".[dev]"
isort demolyzer tests
black demolyzer tests