Skip to content

support for fetching user insights reports - #95

Merged
mrmauer merged 10 commits into
mainfrom
feat/user-insights-api
Apr 21, 2026
Merged

mrmauer merged 10 commits into
mainfrom
feat/user-insights-api

Conversation

@mrmauer

@mrmauer mrmauer commented Jan 30, 2026 •

Copy link
Copy Markdown
Contributor

Tests

tested with example app

After PR

you can do this:

top_inviters_page = auth.fetch_user_top_inviter_report(
    report_interval = TopInviterReportInterval.THIRTY_DAYS,  # defaults to 30 days
    page_size = 10, # default 10 for all report fetches
    page_number = 0, # defaults 0 for all report fetches
)

champions_page = auth.fetch_user_champion_report(
    report_interval = ChampionReportInterval.THIRTY_DAYS,  # defaults to 30 days
)

user_churn_page = auth.fetch_user_churn_report(
    report_interval = ChurnReportInterval.SEVEN_DAYS,  # defaults to 7 days
)

user_reengagement_page = auth.fetch_user_reengagement_report(
    report_interval = ReengagementReportInterval.WEEKLY,  # defaults to weekly
)

org_churn_page = auth.fetch_org_churn_report(
    report_interval = ChurnReportInterval.SEVEN_DAYS,  # defaults to 7 days
)

org_reengagement_page = auth.fetch_org_reengagement_report(
    report_interval = ReengagementReportInterval.WEEKLY,  # defaults to weekly
)

org_growth_page = auth.fetch_org_growth_report(
    report_interval = GrowthReportInterval.THIRTY_DAYS,  # defaults to the last 30 days
)

org_attrition_page = auth.fetch_org_attrition_report(
    report_interval = AttritionReportInterval.THIRTY_DAYS,  # defaults to the last 30 days
)

import datetime as dt
timeseries_of_daily_signups = auth.fetch_chart_metric_data(
    chart_metric = ChartMetric.SIGNUPS,
    cadence = ChartMetricCadence.DAILY, # defaults to daily
    start_date = dt.date.fromisoformat('2026-01-01'), # defaults to 30 days ago
    # end_date defaults to today, but the most recently available results will be yesterday
)

Comment thread propelauth_py/__init__.py
Comment thread propelauth_py/api/user_insights.py Outdated
Comment thread propelauth_py/api/user_insights.py Outdated
@mrmauer
mrmauer requested a review from pfvatterott April 21, 2026 20:09

@pfvatterott pfvatterott left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@mrmauer
mrmauer merged commit 20487b0 into main Apr 21, 2026
1 check passed
@mrmauer
mrmauer deleted the feat/user-insights-api branch April 21, 2026 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants