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 details)
Built Distribution
File details
Details for the file uainsight-0.1.0.tar.gz
.
File metadata
- Download URL: uainsight-0.1.0.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/5.15.133.1-microsoft-standard-WSL2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 651026f82d7c8c4936428b6947eb4e545afa85f4144e15fdd2044de335462924 |
|
MD5 | 3ceee9bf7a639b729fabcc1f26dfa2a0 |
|
BLAKE2b-256 | 0e02616be0e247253eb9a85e15f6fd185b8ec8c8d7e90432dacc9b47ab031439 |
File details
Details for the file uainsight-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: uainsight-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/5.15.133.1-microsoft-standard-WSL2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 126ce0b8d616e51f7c394c9947516848fc985cbb9afd4a56f946406aa36d71a9 |
|
MD5 | 9aec015f8daf402a3b4004dee3890fa0 |
|
BLAKE2b-256 | f01574f12b2a568b0687a81eaf91371c67ff4d006f2b7a5bdc2f1c8d0017034f |