Generate Wrapped-style viewing reports for Plex Media Server users using the Tautulli API.
Check out a demo: https://plex-wrapped.neonvariant.com/wrapped_reports/2025/neonvariant_2025.html
- Individual user reports with viewing statistics
- User rankings by watch time
- Top watched movies and TV shows with posters
- Peak viewing hours analysis
- Platform breakdown
- Binge session detection
- Watch streak tracking
- Genre analysis
- Server-wide summary statistics
- Monthly or yearly report periods
- Python 3.7+
- Plex Media Server
- Tautulli installed and configured
- Tautulli API key
- Plex API token
git clone https://github.com/chase-roohms/plex-wrapped.git
cd plex-wrappedpip install -r requirements.txtCreate a .env file in the root directory:
touch .envAdd the following variables:
TAUTULLI_URL=http://localhost:8181
TAUTULLI_API_KEY=your_tautulli_api_key_here
PLEX_URL=http://localhost:32400
PLEX_API_KEY=your_plex_token_hereGetting API Keys:
Tautulli API Key:
- Open Tautulli web interface
- Go to Settings → Web Interface
- Scroll to API section
- Copy your API key
Plex Token:
- Sign in to Plex Web App
- Open any media item
- Click "..." menu → Get Info → View XML
- Find the
X-Plex-Tokenparameter in the URL
rm -rf wrapped_reports/2025/*# Generate yearly reports (default)
python generate_wrapped.py
# Generate monthly reports
python generate_wrapped.py --period monthlyReports are generated in wrapped_reports/YEAR/.
Open the HTML files in your browser or navigate to the wrapped_reports/ directory.
plex-wrapped/
├── generate_wrapped.py # Main script
├── tautulli_client.py # Tautulli API client
├── wrapped_analytics.py # Analytics calculations
├── wrapped_html_generator.py # HTML report generation
├── definitions.py # Configuration
├── requirements.txt # Python dependencies
├── .env # Environment variables (create this)
├── thumbnails/ # Cached media thumbnails
└── wrapped_reports/ # Generated HTML reports
└── 2025/ # Year-specific reports
Modify in definitions.py:
tracked_media = {'movie', 'episode'}- Yearly: January 1 to current date
- Monthly: Previous complete month
- Verify Tautulli is running and accessible
- Check URLs in
.env(no trailing slashes) - Ensure API keys are valid
- Verify Tautulli has collected data for the analysis period
- Check Tautulli's history retention settings
- Ensure
PLEX_URLandPLEX_API_KEYare configured correctly - Thumbnails are cached in the
thumbnails/directory
Provided as-is for personal use.