Skip to main content

Inspired by the express-useragent package, A User-Agent parser for Python with integrations for FastAPI, Django, and Flask

Project description

uainsight

uainsight is a Python package for parsing and analyzing User-Agent strings. It provides easy integration with FastAPI, Django, and Flask.

Features

  • Parse User-Agent strings
  • Extract browser, operating system, and device information
  • Bot detection
  • Easy integration with FastAPI, Django, and Flask frameworks

Installation

Using Poetry (recommended):

poetry add uainsight

Using pip:

pip install uainsight

Quick Start

from uainsight import parse_user_agent

ua_string = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36"
ua = parse_user_agent(ua_string)

print(f"Browser: {ua.browser.name} {ua.browser.version}")
print(f"OS: {ua.os.name} {ua.os.version}")
print(f"Device: {ua.device}")

Documentation

For full documentation, visit https://joongi007.github.io/uainsight/

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

uainsight-0.1.0.tar.gz (6.2 kB view hashes)

Uploaded Source

Built Distribution

uainsight-0.1.0-py3-none-any.whl (7.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page