Using the Trie wrapper
Before you can use the Trie file to match user agent strings to devices you will need to install the 51Degrees python Trie wrapper. In your terminal, navigate to the correct directory which will probably be the same directory you have used in Step 1 of the Getting Started guide. Then, run the following command.
After the install is successfully complete you will need to change the following lines in your 51degrees-mobile-detector.settings.py file:
DETECTION_METHOD should be set to 'v3-trie-wrapper'
A path to the Trie file should also be specified. In this example my Trie file is located in the same directory as the settings file.
Please note: the configuration file produced by default creates a setting called TRIE_WRAPPER_DATABASE. To use with version 3 this setting must be renamed to V3_TRIE_WRAPPER_DATABASE as in the above snippet.
Your Trie matching is now set up. Use it the same way you would use the Pattern matching - by calling the mobile_detector.match(). For some examples please see the Getting Started section.