ua-parser-rs
native accelerator for ua-parser
What it is and what it does
ua-parser-rs is a Rust-based accelerator for user-agent parsing, designed as a native backend for the ua-parser library rather than for direct use. It wraps uap-rust, a Rust implementation of the user-agent parsing specification, and exposes a minimal Python API to parse HTTP user-agent strings into structured data about browsers, operating systems, and devices.
The package trades ease of development for speed: it requires Python 3.10+ and is distributed as precompiled wheels for major platforms and Python implementations (CPython, GraalPy, PyPy). Installation is straightforward on common systems, though unsupported architectures may need a Rust build environment. The API is intentionally simple and stable to minimize maintenance burden, though the maintainers make no formal guarantee of backward compatibility.
Use it for:
- Speed up web request logging and analytics by parsing user-agent strings faster than pure-Python implementations.
- Integrate into ua-parser as a drop-in accelerator backend for existing applications already using ua-parser.
- Analyze HTTP traffic in high-throughput services where user-agent parsing is a bottleneck.
- Extract browser, OS, and device details from server logs or request streams in real time.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a Rust-accelerated user-agent parser that integrates as a native backend for ua-parser, parsing browser and device information from HTTP user-agent strings.
Yes, if you use ua-parser and want a performance boost without API changes. The package is actively maintained, has no known vulnerabilities, and offers precompiled wheels for common platforms. Install friction is medium but manageable. Not recommended for direct use outside ua-parser integration—check ua-parser's documentation for how to enable this accelerator.
Install
ua-parser-rs on PyPI
pip
pip install ua-parser-rsuv
uv add ua-parser-rspoetry
poetry add ua-parser-rsInstalling ua-parser-rs
Before you install
Medium install friction due to compiled wheels; prebuilt binaries available for common platforms (x86_64, ARM64 on Linux, macOS, Windows) and Python versions 3.10–3.14, reducing build complexity. Active maintenance with recent commits.
License in practice
Apache 2.0 permissive license allows commercial use, modification, and distribution with minimal restrictions; suitable for most projects.
Quickstart
pip install ua-parser-rs
import ua_parser_rs
# Typically used as a backend to ua-parser, not directly
result = ua_parser_rs.parse_user_agent("Mozilla/5.0...")
Requires Python 3.10 or later; precompiled wheels available for common architectures, but installation on unsupported platforms may require Rust toolchain.
Verify before relying
- Whether this package can be used standalone or only through ua-parser's integration layer.
- Performance improvement magnitude compared to pure-Python ua-parser.
- Stability of the public API beyond the stated 'very simplistic' export.
Package facts
| License | Apache 2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 131 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,529,694/month — #2,590 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: ua_parser_rs-0.1.5-cp310-abi3-macosx_10_12_x86_64.whl; ua_parser_rs-0.1.5-cp310-abi3-macosx_11_0_arm64.whl; ua_parser_rs-0.1.5-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; ua_parser_rs-0.1.5-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; ua_parser_rs-0.1.5-cp310-abi3-manylinux_2_34_aarch64.whl; ua_parser_rs-0.1.5-cp310-abi3-manylinux_2_34_x86_64.whl; ua_parser_rs-0.1.5-cp310-abi3-win_amd64.whl; ua_parser_rs-0.1.5-cp310-abi3-win_arm64.whl; ua_parser_rs-0.1.5-cp314-cp314t-macosx_10_12_x86_64.whl; ua_parser_rs-0.1.5-cp314-cp314t-macosx_11_0_arm64.whl; ua_parser_rs-0.1.5-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; ua_parser_rs-0.1.5-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; ua_parser_rs-0.1.5-cp314-cp314t-manylinux_2_34_aarch64.whl; ua_parser_rs-0.1.5-cp314-cp314t-manylinux_2_34_x86_64.whl; ua_parser_rs-0.1.5-cp314-cp314t-win_amd64.whl; ua_parser_rs-0.1.5-cp314-cp314t-win_arm64.whl; ua_parser_rs-0.1.5-graalpy312-graalpy250_312_native-macosx_10_12_x86_64.whl; ua_parser_rs-0.1.5-graalpy312-graalpy250_312_native-macosx_11_0_arm64.whl; ua_parser_rs-0.1.5-graalpy312-graalpy250_312_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; ua_parser_rs-0.1.5-graalpy312-graalpy250_312_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
ua-parserParses user-agent strings to extract browser,…
permissive · top 1,000 on PyPI
ua-parser-builtinsProvides precompiled user-agent parsing rules…
permissive · top 1,000 on PyPI
user-agentsParses browser user agent strings to identify…
permissive · top 5,000 on PyPI
ua-generatorGenerates realistic, randomized user-agent…
permissive · top 5,000 on PyPI
fake-useragentGenerates random or browser-specific user-agent…
permissive · top 5,000 on PyPI
httpagentparserParses HTTP User-Agent strings to extract and…
unclear · top 15,000 on PyPI
django-user-agentsParses HTTP User-Agent headers in Django to…
permissive · top 15,000 on PyPI
device-detectorParses user agent strings and client hints to…
unclear · top 15,000 on PyPI
browser-use-coreProvides packaged Rust terminal binaries and…
unclear · top 15,000 on PyPI
user-agentGenerates random, valid web user agent strings…
permissive · top 15,000 on PyPI