Check weather the user request is from a mobile phone or a computer and perform actions accordingly with flask and python3
from flask import request, render_template
import re
browser = request.user_agent.browser
version = request.user_agent.version and int(request.user_agent.version.split('.')[0])
platform = request.user_agent.platform
uas = request.user_agent.string