Usage Reporting
The Flywheel SDK provides endpoints for querying storage and compute usage across the site. These endpoints require admin permissions.
Overview
Flywheel offers two categories of usage reports:
- Storage reports — show how much data is stored at the site and project level
- Usage reports — show job activity and compute consumption over time
Site-wide storage report
fw.get_site_report() returns a summary of storage consumption across all groups and projects on the site:
Project-level storage report
fw.get_project_report() returns a breakdown of storage usage by one or more projects. Optionally, start_date and end_date can be provided to filter by date:
from datetime import datetime
project_reports = fw.get_project_report(
projects=[project_id],
start_date=datetime(2026, 1, 1),
end_date=datetime(2026, 12, 31),
)
for entry in project_reports.projects:
print(entry.name, entry.demographics_total, entry.demographics_grid)
Usage report by month
fw.get_usage_report() returns job-level usage statistics for a given month. If no month is specified, the current month is used:
usage = fw.get_usage_report()
for entry in usage:
print(entry)
usage = fw.get_usage_report(year=2026, month=3)
for entry in usage:
print(entry)
usage = fw.get_usage_report(year=2026, month=3, project=project_id)
for entry in usage:
print(entry)
Daily usage reports
For finer-grained breakdowns, use the daily usage endpoint:
daily = fw.get_daily_usage_report(year=2026, month=3)
print(daily)
Aggregating storage across projects
A common pattern for capacity planning is to iterate through projects and aggregate their storage into a summary:
project_reports = fw.get_project_report(projects=[project_id_a])
summary = {}
for entry in project_reports.projects:
summary[entry.name] = {
"storage": getattr(entry, "storage", 0),
}
for label, data in sorted(summary.items(), key=lambda x: x[1]["storage"], reverse=True):
print(f"{label}: {data['storage']} bytes")
Checking usage data availability
Before querying historical usage, check which date ranges have data available:
Related pages
- Usage Report product documentation - more information on usage reporting, including how to generate a report from the UI