Skip to content

Commit 53003a7

Browse files
Update README
1 parent cc89a6e commit 53003a7

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,16 @@ from ipregistry import IpregistryClient
3030

3131
client = IpregistryClient("YOUR_API_KEY")
3232
response = client.lookup_ip("54.85.132.205")
33-
print(response.data)
33+
34+
# Printing whole response
35+
print(response)
36+
37+
# Retrieving a specific field
38+
country_code = response.data.location.country.code
39+
40+
# Getting number of credits consumed or remaining
41+
credits_consumed = response.credits.consumed
42+
credits_remaining = response.credits.remaining
3443
```
3544

3645
#### Batch IP Lookup

0 commit comments

Comments
 (0)