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
Release history Release notifications | RSS feed
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)
Built Distribution
Close
Hashes for uainsight-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 126ce0b8d616e51f7c394c9947516848fc985cbb9afd4a56f946406aa36d71a9 |
|
MD5 | 9aec015f8daf402a3b4004dee3890fa0 |
|
BLAKE2b-256 | f01574f12b2a568b0687a81eaf91371c67ff4d006f2b7a5bdc2f1c8d0017034f |