Mobi is a set of Python libraries and WSGI middleware that helps building web applications for mobile phone devices or any other specific browser. It’s based on research by Bob Albrecht and Judith A. Pirani who published the paper "Massachusetts Institute of Technology: Transforming the Campus Experience with the MIT Mobile Web". This paper details what MIT did to build their mobile applications.
The general architecture is as follows. First a request from a browser passes through the device detection in the WSGI middleware and gets tagged as belonging to one of the device categories. Then the request passes to the application which uses this information to render content for the given device. The application reads the information about the device in the WSGI environment.