Registry / serialization / ua-parser-builtins

ua-parser-builtins

JSON →
library202606pypypi✓ verified 26d ago

ua-parser-builtins provides a precompiled ruleset for the `ua-parser` library, aiming to decrease its initialization times. This package itself does not expose any API; it solely contains the data. The precompiled ruleset is released monthly, synchronized with the `uap-core` project's default branch. The current version is 202603, released March 2026.

pip install ua-parser-builtins
INSTALL
IMPORT
SIG · UA-PARSER-BUILTINS
U
ua-parser-builtins
serializationpythonv202606
Install
1.7s avg
Import
76ms
Disk
25MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v202606 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
1/2 runs
✓ 1.6s
py 3.11
1/2 runs
✓ 1.7s
py 3.12
1/2 runs
✓ 1.6s
py 3.13
1/2 runs
✓ 1.6s
py 3.9
1/2 runs
✓ 1.95s
25MB installed
● package 25MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

parse
from ua_parser import parse
from ua_parser_builtins import parse

This quickstart demonstrates the usage of the `ua-parser` library, which is the consumer of the precompiled rules provided by `ua-parser-builtins`. Installing `ua-parser-builtins` along with `ua-parser` will reduce the initialization time of the parser.

from ua_parser import parse # ua-parser-builtins implicitly provides the data used by parse() user_agent_string = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.104 Safari/537.36' parsed_ua = parse(user_agent_string) print(f"User Agent Family: {parsed_ua.user_agent.family}") print(f"OS: {parsed_ua.os.family} {parsed_ua.os.major}.{parsed_ua.os.minor}") print(f"Device Family: {parsed_ua.device.family}")
Debug
Known issues
gotchaua-parser-builtins has no direct API or functionality. It is purely a data package designed to be used by the 'ua-parser' library to speed up its initialization. Installing it alone will not provide user agent parsing capabilities.
fix
Always install 'ua-parser' (e.g., `pip install ua-parser ua-parser-builtins`) to utilize the provided data.
affects: All versions
gotchaFor optimal parsing performance, especially with high-volume user agent strings, consider installing 'ua-parser' with its optional 'regex' or 're2' dependencies. Even with 'ua-parser-builtins' reducing initialization time, the underlying parsing engine within 'ua-parser' affects speed.
fix
Install with `pip install 'ua-parser[regex]' ua-parser-builtins` or `pip install 'ua-parser[re2]' ua-parser-builtins`.
affects: All versions of ua-parser and ua-parser-builtins
gotchaThe versioning scheme for ua-parser-builtins is date-based (YYYYMM). This indicates a refresh of the underlying ruleset, but unlike semantic versioning, it doesn't directly signal API or functionality changes, as the package has no API. Users should be aware that frequent updates reflect new user-agent patterns.
fix
Keep `ua-parser-builtins` updated regularly (e.g., monthly) to ensure the `ua-parser` library benefits from the latest user agent detection rules.
affects: All versions
breakingInstalling 'ua-parser' (or its dependencies like 'ua-parser-rs') on Alpine Linux or similar minimal environments may fail due to missing build dependencies required by its underlying Rust component. Specifically, it requires a C compiler (providing 'libgcc_s.so.1') and the Rust toolchain, which are not included by default in minimal Python images.
fix
Before installing 'ua-parser', ensure the necessary build dependencies are installed in the environment. For Alpine Linux, this typically involves running `apk add build-base rust`.
affects: All versions of ua-parser that depend on Rust extensions, especially on Alpine Linux and other minimal distributions.
Upgrade
Version history
202606latest on PyPI · released Jun 1, 2026
Audit
Dependencies
ua-parserrequiredThis package provides precompiled data for 'ua-parser'. It has no API of its own and is useless without 'ua-parser' installed to consume its data.
Agent activity
23 hits · last 30 days
node
20
OpenAI (training)
1
Resources
ua-parser-builtins — pip install ua-parser-builtins · libregistry