Skip to main content

Downloads

PYPI

Travis

Features

  • Fast
  • Detects OS and Browser. Does not aim to be a full featured agent parser
  • Will not turn into django-httpagentparser ;)

Usage

>>> import httpagentparser
>>> s = "Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/532.9 (KHTML, like Gecko) \
        Chrome/5.0.307.11 Safari/532.9"
>>> print(httpagentparser.simple_detect(s))
('Linux', 'Chrome 5.0.307.11')
>>> print(httpagentparser.detect(s))
{'os': {'name': 'Linux'},
 'browser': {'version': '5.0.307.11', 'name': 'Chrome'}}

>>> s = "Mozilla/5.0 (Linux; U; Android 2.3.5; en-in; HTC_DesireS_S510e Build/GRJ90) \
        AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1"
>>> print(httpagentparser.simple_detect(s))
('Android Linux 2.3.5', 'Safari 4.0')
>>> print(httpagentparser.detect(s))
{'dist': {'version': '2.3.5', 'name': 'Android'},
'os': {'name': 'Linux'},
'browser': {'version': '4.0', 'name': 'Safari'}}

History

http://stackoverflow.com/questions/927552/parsing-http-user-agent-string/1151956#1151956

Download files

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

Source Distribution

httpagentparser-1.9.9.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

httpagentparser-1.9.9-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file httpagentparser-1.9.9.tar.gz.

File metadata

  • Download URL: httpagentparser-1.9.9.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.5

File hashes

Hashes for httpagentparser-1.9.9.tar.gz
Algorithm Hash digest
SHA256 23bcaf09325b17af7634283ca64da23f485c5d83b9481ff6d88413a7c5bc6de9
MD5 0f193659c98b546ddb70834605c11f2b
BLAKE2b-256 f844028b51ff3a2a5c67af2ea929ead36f2d90e9efda1932ff4e45a36aae58eb

See more details on using hashes here.

File details

Details for the file httpagentparser-1.9.9-py3-none-any.whl.

File metadata

File hashes

Hashes for httpagentparser-1.9.9-py3-none-any.whl
Algorithm Hash digest
SHA256 755898cc96e796f6bf5327b604a81502622fd00637ef319af133a6ffd1a3e753
MD5 377cbb1aee630309abbdd2969ec8c156
BLAKE2b-256 95ca50ca912f58807e14b6e993d1b75d2a951e014ed82fe42779947ca3e6a159

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.9.9 This release

2 files

1.9.5

1 file

1.9.3

1 file

1.9.2

1 file

1.9.1

1 file

1.9.0

1 file

1.8.5

1 file

1.8.4

1 file

1.8.3

1 file

1.8.2

1 file

1.8.1

1 file

1.8.0

1 file

1.7.9

1 file

1.7.8

1 file

1.7.7

1 file

1.7.6

1 file

1.7.5

1 file

1.7.4

1 file

1.7.3

1 file

1.7.0

1 file

1.6.0

1 file

1.5.1

1 file

1.5.0

1 file

1.4.0

1 file

1.3.2

1 file

1.3.1

1 file

1.3.0

1 file

1.2.2

1 file

1.2.1

1 file

1.2.0

1 file

1.1.3

1 file

1.1.2

1 file

1.1.1

1 file

1.1.0

1 file

1.0.5

1 file

1.0.3

1 file

1.0.2

1 file

1.0.1

1 file

1.0.0

1 file

0.9.9

1 file

0.9.8

1 file

0.9.7

1 file

0.9.6

1 file

0.9.5

1 file

0.9.3

1 file

0.9.2

1 file

0.9.0

1 file

0.8.6

1 file

0.8.5

1 file

0.8.4

1 file

0.8.3

1 file

0.8.2

1 file

0.8.1

1 file

0.8

1 file

0.7

1 file

0.6

1 file

0.5

-1.7.2-

1 file

-1.7.1-

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page