# selwin/python-user-agents

A Python library that provides an easy way to identify devices like mobile phones, tablets and their capabilities by parsing (browser) user agent strings.

Repository: https://github.com/selwin/python-user-agents
Canonical: https://ross.abutalabs.com/products/python-user-agents
Language: Python
License: MIT
License Family: permissive
Topics: user-agent-detection, browser-detection, python
Last push: 2023-02-16T01:51:50+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4989, "days_push": 1295, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1513, forks 196 (observed 2026-08-28T04:04:56.234523+00:00)

## What it is
A Python library that parses browser user agent strings to identify devices (mobile, tablet, PC), browsers, operating systems, and capabilities like touch support. It builds on top of ua-parser for the raw parsing.

## Use cases
- detect mobile devices from user agent strings in python
- check if a request comes from a tablet or phone
- parse browser and os info from http user agent headers
- identify bots from user agent strings
- detect touch capability of visitors
- classify web traffic by device type

## When to choose
- you need simple device/browser/OS classification from user agent strings in Python
- you want convenient boolean flags like is_mobile, is_tablet, is_bot on top of ua-parser

## When to avoid
- you need highly accurate, frequently updated device detection for the latest devices
- you need client-side (JavaScript) detection
- you need detailed device hardware capabilities beyond basic family/brand/model

## Facets
- artifact type: library
- maturity: maintenance
- function: parser, http-client
- domain: web-development, analytics, developer-tools
- platform: python
- tags: user-agent-parsing, device-detection, browser-detection, mobile-detection

## Member repositories
- selwin/python-user-agents (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:56.234523+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:32:17.134762+00:00, confidence not recorded.
  - readme: https://github.com/selwin/python-user-agents (fetched 2026-08-28T04:04:56.234523+00:00, sha 738aa6ef7a6b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
