Overview
The Timeback Python SDK providesTimebackFastAPI, a ready-made FastAPI integration that creates an APIRouter with all Timeback routes.
Installation
Server Setup
Timeback instance
Create a module that configures the Timeback instance.TimebackFastAPI is callable as a FastAPI dependency via Depends(timeback):
App initialization
Mount the Timeback router on your FastAPI app:app/main.py
TimebackFastAPI is fully initialized at construction time.
Usage
UseDepends(timeback) in your own routes for server-side operations like recording activity completion or fetching user data:
app/routes/activities.py
timeback.user namespace to verify users or fetch profiles without going through the HTTP handlers:
app/routes/users.py
See stateful activities for the full
server-side completion workflow, and user profile
for details on
verify() and get_profile().Depends(timeback):
app/routes/lessons.py
See the Managed Lessons reference
for all server-side operations (
list, start, next, submit, complete, attempts, attemptDetails),
parameters, and return types.Next Steps
Managed Lessons
Server-side lessons API reference
Custom Activities
Track learning sessions
Client Adapters
Frontend setup (React, Vue, Svelte, Solid)
Identity
Authentication options