Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5d378c6

Browse filesBrowse files
committed
Updated README.rst.
1 parent fcf9d2d commit 5d378c6
Copy full SHA for 5d378c6

File tree

Expand file treeCollapse file tree

2 files changed

+11
-10
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+11
-10
lines changed

‎README.rst

Copy file name to clipboardExpand all lines: README.rst
+11-8Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
Python User Agents
22
==================
33

4-
`user_agents` is a Python library that provides an easy way to identify devices like mobile phones,
4+
``user_agents`` is a Python library that provides an easy way to identify devices like mobile phones,
55
tablets and their capabilities by parsing (browser) user agent strings. The goal is to reliably
66
detect whether:
77

88
* User agent is a mobile, tablet or PC based device
99
* User agent has touch capabilities (has touch screen)
1010

11-
`user_agents` relies on the excellent `ua-parser <https://github.com/tobie/ua-parser>`_ to do the
11+
``user_agents`` relies on the excellent `ua-parser <https://github.com/tobie/ua-parser>`_ to do the
1212
actual parsing of the raw user agent string.
1313

1414
This library should be considered "alpha". Please post feature suggestions, bug or pull requests to
@@ -18,7 +18,10 @@ identify more devices on Github.
1818
Installation
1919
============
2020

21-
WARNING: This library should be considered "alpha". Use this in production at your own risk.
21+
WARNING: This library should be considered "alpha". Use this in production at your own risk.
22+
``user-agents`` is hosted on `PyPI <http://pypi.python.org/pypi/user-agents/>`_ and can be installed as such::
23+
24+
pip install pyyaml ua-parser user-agents
2225

2326
Usage
2427
=====
@@ -50,16 +53,16 @@ and `os` attributes. For example:
5053
user_agent.device.family # returns 'iPhone'
5154
5255
53-
`user_agents` also expose a few other more "sophisticated" attributes that are derived from one or
56+
``user_agents`` also expose a few other more "sophisticated" attributes that are derived from one or
5457
more basic attributes defined above. As for now, these attributes should correctly identify
5558
popular platforms/devices, pull requests to support smaller ones are always welcome.
5659

5760
Currently these attributes are supported:
5861

59-
* `is_mobile` - whether user agent is identified as a mobile phone (iPhone, Android phones, Blackberry, Windows Phone devices etc)
60-
* `is_tablet` - whether user agent is identified as a tablet device (iPad, Kindle Fire, Nexus 7 etc)
61-
* `is_pc` - whether user agent is identified to be running a traditional "desktop" OS (Windows, OS X, Linux)
62-
* `is_touch_capable` - whether user agent has touch capabilities
62+
* ``is_mobile``: whether user agent is identified as a mobile phone (iPhone, Android phones, Blackberry, Windows Phone devices etc)
63+
* ``is_tablet``: whether user agent is identified as a tablet device (iPad, Kindle Fire, Nexus 7 etc)
64+
* ``is_pc``: whether user agent is identified to be running a traditional "desktop" OS (Windows, OS X, Linux)
65+
* ``is_touch_capable``: whether user agent has touch capabilities
6366

6467

6568
For example:

‎requirements.txt

Copy file name to clipboardExpand all lines: requirements.txt
-2Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.