forked from hamaxx/uasparser2
-
Notifications
You must be signed in to change notification settings - Fork 4
/
setup.py
56 lines (37 loc) · 1.13 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
"""
uasparser2
----------
Fast and reliable User Agent parser.
Easy to use
```````````
::
from uasparser2 import UASparser
uas_parser = UASparser('/path/to/your/cache/folder', mem_cache_size=1000)
result = uas_parser.parse('YOUR_USERAGENT_STRING')
# If input data is not avaible in cache folde, UASparser will download and prepare it on init.
# Force data update by calling:
uas_parser.updateData()
Fast
````
::
Parsing 100,000 real user agents (10,000 unique):
original uasparser: 7264.2 sec
uasparser2 without cache: 171.7 sec
uasparser2 with cache(size 1000): 34.6 sec
Links
`````
* `GitHub Home <https://github.com/hamaxx/uasparser2/>`_
* `User Agent Database <http://user-agent-string.info/>`_
"""
from setuptools import setup
setup(name='uasparser2',
version='0.1',
author='Jure Ham',
license='BSD',
author_email='[email protected]',
description="Fast and reliable User Agent parser for Python.",
long_description=__doc__,
url='https://github.com/hamaxx/uasparser2',
packages=['uasparser2',],
platforms='any',
zip_safe=True)