Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はPythonボトルフレームワークが初めてで、 $_SERVER['HTTP_USER_AGENT'] 変数値を特別に取得する必要があります。どうすればこれを達成できるかを説明してください。
それを試してみてください:
import request, route, run @route('/user-agent') def user_agent(): return request.environ.get('HTTP_USER_AGENT') run()