1.1.2.3. book_server_api.main module

1.1.2.3.1. Overview

This module contains the main FastAPI app and the routers for the book server.

routers are used to organize the code for the book server. They are a way to group related routes together. See FastAPI Routers. We define routers for the following:

  • Retrieve results of questions - rsptx.book_server_api.routers.assessment

  • Serve book files - rsptx.book_server_api.routers.books

  • Save activities from book interactions - rsptx.book_server_api.routers.rslogging

  • Authentication rsptx.book_server_api.routers.auth

  • Web Socket handling for peer instruction - rsptx.book_server_api.routers.discuss

  • Code Coach - rsptx.book_server_api.routers.coach

This module also contains code for startup and shutdown events. See FastAPI Startup and Shutdown Events.

Finally some middleware is defined here. See FastAPI Middleware.

1.1.2.3.2. Detailed Module Description

book_server_api.main.init_graders()
book_server_api.main.lifespan(app: FastAPI)