Skip to content
Parser for osr (osu! replays) file format
Branch: master
Clone or download
Latest commit c8cd548 May 22, 2017
Type Name Latest commit message Commit time
Failed to load latest commit information.
osrparse datetime(1, 1, 1) to datetime.min May 22, 2017
tests Add missing datetime import in tests May 14, 2017
.gitignore Renamed all instances of ModCombinatino to Mod Jan 25, 2016
.travis.yml test autorelease Jan 21, 2016
LICENSE Initial commit Jan 20, 2016 Update May 22, 2017 New version May 22, 2017

Build Status

osrparse, a parser for osu replays in Python

This is a parser for osu! rhythm game replays as described by


To install osrparse, simply:

$ pip install osrparse


To parse a replay from a filepath:

from osrparse import parse_replay_file

#returns instance of Replay

To parse a replay from a bytestring:

from osrparse import parse_replay

#returns instance of Replay given the replay data encoded as a bytestring

Replay instances provide these fields

self.game_mode #GameMode enum
self.game_version #Integer
self.beatmap_hash #String
self.player_name #String
self.replay_hash #String
self.number_300s #Integer
self.number_100s #Integer
self.number_50s #Integer
self.gekis #Integer
self.katus #Integer
self.misses #Integer
self.score #Integer
self.max_combo #Integer
self.is_perfect_combo #Boolean
self.mod_combination #frozenset of Mods
self.life_bar_graph #String, unparsed as of now
self.timestamp #Python Datetime object
self.play_data #List of ReplayEvent instances

ReplayEvent instances provide these fields

self.time_since_previous_action #Integer representing time in milliseconds
self.x #x axis location
self.y #y axis location
self.keys_pressed #bitwise sum of keys pressed, documented in OSR format page.
You can’t perform that action at this time.