Install & Compatibility
Where this runs
tested against v1.10.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.024s · 18MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 1.6s · import 0.022s · 19MB
16MB installed
● package 16MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
parse
✓ from woothee import parse
✗ from woothee.parser import parse
parse is a top-level function
Classifier
✓ from woothee import Classifier
✗ from woothee.classifier import Classifier
Classifier is top-level
Parse a user agent string to extract browser, OS, and device info.
from woothee import parse
user_agent = 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)'
result = parse(user_agent)
print(result)
# Output: {'name': 'Googlebot', 'category': 'crawler', 'os': 'UNKNOWN', 'os_version': 'UNKNOWN', 'version': '2.1', 'vendor': 'GoogleInc.'}
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'woothee.parser'
Importing submodules that don't exist; `parse` is at top level.
fixUse `from woothee import parse`.
KeyError: 'name'
Assuming `parse` returns an object with attributes instead of a dict.
fixAccess fields with `result['name']`, not `result.name`.
Upgrade
Version history
1.10.1latest on PyPI · released Aug 8, 2019
Audit
Dependencies
No dependency data recorded yet.