useragent is a Python library that parses HTTP User-agent strings
and tries to give you as much data as possible in a normalized form.
It uses the data provided by the ua-parser project (originally collected by
Steve Souders). It aims to be more pythonic than the python wrapper found
in the original ua-parser project.
ua = useragent.detect("Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; nl; rv:184.108.40.206) Gecko/2008070206 Firefox/3.0.1")
Which would print ``ua``, a dict-like object with the following structure::
'family': 'Mac OS X',
The ``ua`` object actually has each of those keys exposed as attributes on itself, so you may find it more comfortable to navigate like so::
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.