skillfed

ua-parser

Python port of Browserscope's user agent parser

ua-parser Permissive license Apache-2.0 Active 648 v1.0.2 released

Install

ua-parser on PyPI

pip

pip install ua-parser

uv

uv add ua-parser

poetry

poetry add ua-parser

Package 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

Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: GraalPyProgramming Language :: Python :: Implementation :: PyPyTopic :: Internet :: WWW/HTTPTopic :: Software Development :: Libraries :: Python Modules

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:...

Read as markdown · JSON record · Source repository · Docs

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
user agent parserparse user agent stringbrowser detection pythonos detection from user agentdevice identification httpuser agent parsing libraryhttp header parsing

Similar packages