Installation

Installation

target:

https://uap-python.readthedocs.io/

alt:

Documentation Status

Installing

Add ua-parser[regex] to your project’s dependencies, or run

$ pip install 'ua-parser[regex]'

to install in the current environment.

ua-parser supports CPython 3.10 and newer, recent pypy (supporting 3.10), and GraalPy 25.

Note

The [regex] feature is strongly recommended, the Pure python (no feature) is significantly slower, especially on non-cpython runtimes, though it is the most memory efficient.

See builtin resolvers for more explanation of the tradeoffs between the different options.

Optional Dependencies

ua-parser currently has three optional dependencies, regex, google-re2 and PyYaml. These dependencies will be detected and used augitomatically if installed, but can also be installed via and alongside ua-parser:

$ pip install 'ua-parser[regex]'
$ pip install 'ua-parser[re2]'
$ pip install 'ua-parser[yaml]'
$ pip install 'ua-parser[regex,yaml]'

yaml enables the ability to load rulesets from yaml.

The other two features enable more efficient resolvers. By default, ua-parser will select the fastest resolver it finds out of the available set (regex > re2 > python).