Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dcb4085

Browse files
committed
Merge pull request ua-parser#37 from pdelsante/fix-doc
Adding a few words about how to install via pip
2 parents ef275f5 + b04e545 commit dcb4085

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

README.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ A python implementation of the UA Parser (https://github.com/ua-parser, formerly
77

88
##Installing
99

10+
### Install via pip
11+
Just run:
12+
```
13+
$ pip install ua-parse
14+
```
15+
16+
### Manual install
1017
In the top-level directory run:
1118
```
1219
$ make
@@ -16,7 +23,7 @@ $ make
1623

1724
### retrieve data on a user-agent string
1825
```
19-
>>> import user_agent_parser
26+
>>> from ua_parser import user_agent_parser
2027
>>> import pprint
2128
>>> pp = pprint.PrettyPrinter(indent=4)
2229
>>> ua_string = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.104 Safari/537.36'
@@ -39,7 +46,7 @@ $ make
3946
### extract browser data from user-agent string
4047

4148
```
42-
>>> import user_agent_parser
49+
>>> from ua_parser import user_agent_parser
4350
>>> import pprint
4451
>>> pp = pprint.PrettyPrinter(indent=4)
4552
>>> ua_string = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.104 Safari/537.36'
@@ -54,7 +61,7 @@ $ make
5461
### extract OS information from user-agent string
5562

5663
```
57-
>>> import user_agent_parser
64+
>>> from ua_parser import user_agent_parser
5865
>>> import pprint
5966
>>> pp = pprint.PrettyPrinter(indent=4)
6067
>>> ua_string = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.104 Safari/537.36'
@@ -71,7 +78,7 @@ $ make
7178

7279

7380
```
74-
>>> import user_agent_parser
81+
>>> from ua_parser import user_agent_parser
7582
>>> import pprint
7683
>>> pp = pprint.PrettyPrinter(indent=4)
7784
>>> ua_string = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.104 Safari/537.36'

0 commit comments

Comments
 (0)