Skip to content

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:

Get the site-wide storage report (admin only)
report = fw.get_site_report()
print(report)

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:

Get storage report for specific projects with date filter
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:

Get usage report for the current month
usage = fw.get_usage_report()
for entry in usage:
    print(entry)
Get usage report for a specific month
usage = fw.get_usage_report(year=2026, month=3)
for entry in usage:
    print(entry)
Get usage report filtered to a specific project
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:

Get daily usage for a specific month
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:

Aggregate storage usage across one or more projects
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:

Check usage data availability
availability = fw.get_usage_availability()
print(availability)