$npx skillfedfor your agent

django-user-agents

A django package that allows easy identification of visitors' browser, operating system and device information (mobile phone, tablet or has touch capabilities).

SkipPyPI Python ModulesReleased Jun 2019793.3K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — django_user_agents-0.4.0-py3-none-any.whl
v0.4.0 · released 2019-06-22 · 2 runtime deps: django, user-agents

No—not without caution. The package is abandoned (last release 2019-06-22, last commit 2021-09-02) and its classifiers only cover Python 2.7 and 3.4–3.7, all end-of-life. Compatibility with modern Django and Python is unverified. For new projects, consider a maintained alternative or verify that the upstream user-agents library is still actively updated before committing.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires django and user-agents to be installed first.
  • Optional but recommended: a cache backend configured in Django settings to speed up parsing.
  • Low friction install with just two runtime dependencies.

License · maintenance · safety

MIT (permissive) — MIT license (permissive) places no restrictions on use, modification, or distribution in your own projects.

last release 2019-06-22 (2610 days) · last repo commit 2021-09-02 · 648 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 793,298 downloads/mo, #5,042 on PyPI

Verify before relying

pip install django-user-agents

# In settings.py
INSTALLED_APPS = ['django_user_agents']
MIDDLEWARE_CLASSES = ['django_user_agents.middleware.UserAgentMiddleware']

# In views.py
def my_view(request):
    if request.user_agent.is_mobile:
        # Handle mobile visitor
  • Compatibility with Django versions released after 2.2.
  • Compatibility with Python versions after 3.7.
  • Whether the underlying user-agents library is still maintained and receives UA database updates.
Same gist for agents: .md · .json

What it is and what it does

django-user-agents is a Django middleware and utility package that wraps user-agents to parse HTTP User-Agent headers and expose device, browser, and OS information on each request. It adds a user_agent attribute to the request object, allowing you to check properties like is_mobile, is_tablet, is_touch_capable, is_pc, and is_bot, plus access detailed browser family and version, OS family and version, and device family. The package also provides template filters and a utility function for use in views.

The package depends on django and user-agents as runtime dependencies. It supports optional caching via Django's cache framework to avoid re-parsing the same User-Agent strings. However, the package has been abandoned since 2019—no releases or commits for several years—and its classifiers reflect Python 2.7 and Python 3.4–3.7, all now end-of-life. Using it on modern Python or Django versions carries risk of undetected incompatibilities.

Use it for

  • Serve different HTML or CSS to mobile visitors versus desktop users without JavaScript detection.
  • Log or track device type (phone, tablet, PC) for analytics or user behavior studies.
  • Conditionally render touch-friendly UI components in templates when is_touch_capable is true.
  • Block or flag bot traffic by checking is_bot in middleware or views.
  • Adapt API responses or content based on device capabilities detected from User-Agent.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Skip

No—not without caution.

The package is abandoned (last release 2019-06-22, last commit 2021-09-02) and its classifiers only cover Python 2.7 and 3.4–3.7, all end-of-life. Compatibility with modern Django and Python is unverified. For new projects, consider a maintained alternative or verify that the upstream user-agents library is still actively updated before committing.

Install

django-user-agents on PyPI

Before you install

Low friction install with just two runtime dependencies. However, the package is abandoned—last release was 2019-06-22 and last commit 2021-09-02. Classifiers list Python 2.7 and Python 3.4–3.7, which are now end-of-life; compatibility with modern versions is unverified.

Requires django and user-agents to be installed first. Optional but recommended: a cache backend configured in Django settings to speed up parsing.

License in practice

MIT license (permissive) places no restrictions on use, modification, or distribution in your own projects.

Quickstart

pip install django-user-agents

# In settings.py
INSTALLED_APPS = ['django_user_agents']
MIDDLEWARE_CLASSES = ['django_user_agents.middleware.UserAgentMiddleware']

# In views.py
def my_view(request):
    if request.user_agent.is_mobile:
        # Handle mobile visitor

Verify before relying

  • Compatibility with Django versions released after 2.2.
  • Compatibility with Python versions after 3.7.
  • Whether the underlying user-agents library is still maintained and receives UA database updates.

Package facts

LicenseMIT permissive
Python supportNot specified
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
djangouser-agents
MaintenanceAbandoned 2,610 days since the last release
Last repo commit
First released
Downloads793,298 / month, #5,042 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 4 - BetaEnvironment :: Web EnvironmentFramework :: DjangoIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Internet :: WWW/HTTPTopic :: Software Development :: Libraries :: Python Modules

Evidence: django_user_agents-0.4.0-py3-none-any.whl

Tags

Capabilities
django user agent detectionbrowser os device identificationmobile tablet detection djangouser agent parsing middlewarevisitor device classification
Topics
device-detectionmiddlewareabandoned

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “django user agent detection”

  • django-user-agentsParses HTTP User-Agent headers in Django to identify visitor browser,…
  • httpagentparserParses HTTP User-Agent strings to extract and identify the operating…
  • crawlerdetectIdentifies bots, crawlers, and spiders by analyzing user agents and…

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also user-agents · pymobiledetect · device-detector · httpagentparser · ua-parser · fake-useragent · ua-parser-rs · random-user-agent · browserforge · ua-generator