Metadata-Version: 1.0
Name: useragent
Version: 0.1.0
Summary: UNKNOWN
Home-page: https://bitbucket.org/mirusresearch/useragent
Author: Don Spaulding
Author-email: donspauldingii@gmail.com
License: The data files contained in resources/* are mostly collected from the original ua-parser project (found at https://github.com/tobie/ua-parser) and are believed to be Copyright 2009 Google Inc. and available under the Apache License, Version 2.0.

The rest of the code is licensed under the following BSD 2-clause license.

Copyright (c) 2012, Mirus Research
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Description: ==================================
        useragent
        ==================================
        
        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.
        
        To-wit::
        
            #!/usr/bin/env python
        
            import useragent
            ua = useragent.detect("Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; nl; rv:1.9.0.1) Gecko/2008070206 Firefox/3.0.1")
            print(ua)
        
        Which would print ``ua``, a dict-like object with the following structure::
            {
                'device': {
                    'family': None,
                    'major_version': None,
                    'minor_version': None,
                    'patch_version': None
                },
                'os': {
                    'family': 'Mac OS X',
                    'major_version': '10',
                    'minor_version': '5',
                    'patch_version': None
                },
                'browser': {
                    'family': 'Firefox',
                    'major_version': '3',
                    'minor_version': '0',
                    'patch_version': '1'
                }
            }
        
        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::
            print(ua.browser.family)
            print(ua.os.family)
            print(ua.device.family)
        
Platform: UNKNOWN
