A lightweight library for parsing foobar2000 XML statistics into Pydantic models
- Parsing
Foobar2000XML statistics files - Using
Pydantic - Simple and intuitive API
- Using generators to reduce memory consumption
- Supports Python 3.10+
First, select the tracks in the playlist for which you want to export statistics > right-click > Playback Statistics > Export Statistics to XML...
Then a window will appear:
pip install foobarstats
poetry add commandline
import foobarstats
with open('your_filepath.xml', 'r') as fp:
for stat in foobarstats.load(fp):
print(stat) # prints TrackStat object