Minimal library intended to parse events in Fortnite replay files.
Project description
Fortnite Replay Parser
Minimal Python library intended to parse events in Fortnite replay files from Chapter 4 Season 1 with backwards compatibility for earlier versions.
Example Usage
Here is an example function that will output match events regarding player eliminations and other statistics to a JSON file in the root directory.
This should help you get started with using the library and collecting data from game replays:
import json
import os
from reader import FortniteReplayReader
from pydantic.json import pydantic_encoder
filename = os.path.join(os.path.dirname(__file__), "your_replay_file.replay")
with FortniteReplayReader(filename) as replay:
header = replay.header.dict()
metadata = replay.metadata.dict(exclude={"encryption_key"})
output = {"header": header, "metadata": metadata, "events": replay.events}
with open("replay_dump.json", "w") as f:
json.dump(output, f, indent=4, default=pydantic_encoder)
Credits
Credits to Shiqan for various protocol documentation and developing the original Python implementation. This library is a fork of that project.
Credits to xNocken whose Node library proved to be a great reference in getting started with updating this project.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fortnite_replay_parser-0.1.0.tar.gz.
File metadata
- Download URL: fortnite_replay_parser-0.1.0.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1fe2c26badb0b77da21073311f5bd3815b2f186534a5960731a3a919ca9679e
|
|
| MD5 |
854b038299163cd31f59cc403d050d05
|
|
| BLAKE2b-256 |
c84eba4640cef295a4d22834cdcbec5c5b1243f8358a99dd12e64684f2c5eb91
|
File details
Details for the file fortnite_replay_parser-0.1.0-py3-none-any.whl.
File metadata
- Download URL: fortnite_replay_parser-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c2fa8a1e6030dbc9118484763f195e02aabcadad0321731d11a05fb8b0efbf8
|
|
| MD5 |
35e763d91398a7a1633d58d04ac0a2de
|
|
| BLAKE2b-256 |
7ec81a2ffbf1bf1e75eca0fcc5750c603de41d87e65c9097ca8792a551cf45ca
|