ua-parser
Python port of Browserscope's user agent parser
Install
ua-parser on PyPI
pip
pip install ua-parseruv
uv add ua-parserpoetry
poetry add ua-parserPackage facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — ua-parser-builtins |
| Maintenance | actively maintained — 130 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: ua_parser-1.0.2-py3-none-any.whl
About ua-parser
from the package's own PyPI description — quoted content, verbatim
uap-python
Official python implementation of the User Agent String
Parser <https://github.com/ua-parser>_ project.
Build Status
.. image:: https://github.com/ua-parser/uap-python/actions/workflows/ci.yml/badge.svg :target: https://github.com/ua-parser/uap-python/actions/workflows/ci.yml?query=branch%3Amaster :alt: CI on the master branch
.. image:: https://readthedocs.org/projects/uap-python/badge/?version=latest :target: https://uap-python.readthedocs.io/ :alt: Documentation Status
Installing
Add ua-parser[regex] to your project's dependencies, or run
.. code-block:: sh
$ 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.
.. _builtin resolvers:...
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
Parses user-agent strings to extract browser, operating system, and device information. Provides structured access to family, version, and device details from HTTP user-agent headers.
Low friction: pure Python wheel with a single optional runtime dependency (ua-parser-builtins). Actively maintained with recent releases; last commit 2026-05-27 and 648 repository stars indicate stable, ongoing support.
Apache-2.0 permissive license allows commercial use, modification, and distribution with minimal restrictions—suitable for most projects.
Usage
pip install ua-parser
from ua_parser import parse
result = parse('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36')
print(result.user_agent.family, result.os.family, result.device.brand)
Requires Python 3.10 or newer (CPython, PyPy 3.10+, or GraalPy 25); the [regex] extra is strongly recommended for performance.
Verdict: Production-ready, actively maintained parser with no known vulnerabilities and permissive licensing. Low install friction and broad Python runtime support make it a solid choice for user-agent analysis in web applications.
Needs verification
- Performance characteristics and memory footprint compared to the pure-Python variant in production workloads
- Whether ua-parser-builtins introduces any additional system dependencies or compilation requirements
Similar packages
permissive · top 1,000 on PyPI
seleniumpermissive · top 1,000 on PyPI
Protegopermissive · top 1,000 on PyPI
Send2Trashpermissive · top 1,000 on PyPI
curl-cffipermissive · top 1,000 on PyPI
findpythonpermissive · top 1,000 on PyPI
psutilpermissive · top 1,000 on PyPI
elastic-transportpermissive · top 1,000 on PyPI
grpciopermissive · top 100 on PyPI
semverpermissive · top 1,000 on PyPI