You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-11Lines changed: 7 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,24 +35,20 @@ Replace `test` with your API Key in the following examples.
35
35
You can look up the calling IP address, that is, the IP address of the computer you are running this on by not passing an IP address to the `lookup` method.
36
36
37
37
```
38
-
from ipdata import ipdata
39
-
from pprint import pprint
40
-
# Create an instance of an ipdata object. Replace `test` with your API Key
41
-
ipdata = ipdata.IPData('test')
42
-
response = ipdata.lookup()
43
-
pprint(response)
38
+
>>> import ipdata
39
+
>>> ipdata.api_key = <YOUR API KEY>
40
+
>>> ipdata.lookup()
44
41
```
45
42
46
43
### Looking up any IP Address
47
44
48
45
You can look up any valid IPv4 or IPv6 address by passing it to the `lookup` method.
49
46
50
47
```
51
-
from ipdata import ipdata
52
-
from pprint import pprint
53
-
# Create an instance of an ipdata object. Replace `test` with your API Key
0 commit comments