Skip to content

Commit 6980f1e

Browse files
committed
added country_currency
1 parent 55f8fc0 commit 6980f1e

File tree

7 files changed

+306
-7
lines changed

7 files changed

+306
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ Request behavior can be modified by setting the `request_options` keyword argume
232232

233233
### Internationalization
234234

235-
When looking up an IP address, the response object includes a `details.country_name`, `details.isEU` and `details.country_flag` attributes which includes the country based on American English. It is possible to return the country name in other languages by setting the `countries_file`, remove or add EU countries by setting the keyword argument `eu_countries_file` or change the country flag emoji or unicode by setting the keyword argument `countries_flags_file` when creating the `IPinfo` object.
235+
When looking up an IP address, the response object includes a `details.country_name`, `details.isEU`, `details.country_flag` and `details.country_currency` attributes which includes the country based on American English. It is possible to return the country name in other languages by setting the `countries_file`, remove or add EU countries by setting the keyword argument `eu_countries_file`, change the country flag emoji or unicode by setting the keyword argument `countries_flags_file` or change country's currency code or currency symbol by setting the `countries_currencies` when creating the `IPinfo` object.
236236

237237
The file must be a `.json` file with the following structure:
238238

ipinfo/currency.json

Lines changed: 252 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,252 @@
1+
{
2+
"AD" : { "code": "EUR" ,"symbol": ""},
3+
"AE" : { "code": "AED" ,"symbol": "د.إ"},
4+
"AF" : { "code": "AFN" ,"symbol": "؋"},
5+
"AG" : { "code": "XCD" ,"symbol": "$"},
6+
"AI" : { "code": "XCD" ,"symbol": "$"},
7+
"AL" : { "code": "ALL" ,"symbol": "L"},
8+
"AM" : { "code": "AMD" ,"symbol": "֏"},
9+
"AO" : { "code": "AOA" ,"symbol": "Kz"},
10+
"AQ" : { "code": "" ,"symbol": "$"},
11+
"AR" : { "code": "ARS" ,"symbol": "$"},
12+
"AS" : { "code": "USD" ,"symbol": "$"},
13+
"AT" : { "code": "EUR" ,"symbol": ""},
14+
"AU" : { "code": "AUD" ,"symbol": "$"},
15+
"AW" : { "code": "AWG" ,"symbol": "ƒ"},
16+
"AX" : { "code": "EUR" ,"symbol": ""},
17+
"AZ" : { "code": "AZN" ,"symbol": ""},
18+
"BA" : { "code": "BAM" ,"symbol": "KM"},
19+
"BB" : { "code": "BBD" ,"symbol": "$"},
20+
"BD" : { "code": "BDT" ,"symbol": ""},
21+
"BE" : { "code": "EUR" ,"symbol": ""},
22+
"BF" : { "code": "XOF" ,"symbol": "CFA"},
23+
"BG" : { "code": "BGN" ,"symbol": "лв"},
24+
"BH" : { "code": "BHD" ,"symbol": ".د.ب"},
25+
"BI" : { "code": "BIF" ,"symbol": "FBu"},
26+
"BJ" : { "code": "XOF" ,"symbol": "CFA"},
27+
"BL" : { "code": "EUR" ,"symbol": ""},
28+
"BM" : { "code": "BMD" ,"symbol": "$"},
29+
"BN" : { "code": "BND" ,"symbol": "$"},
30+
"BO" : { "code": "BOB" ,"symbol": "$b"},
31+
"BQ" : { "code": "USD" ,"symbol": "$"},
32+
"BR" : { "code": "BRL" ,"symbol": "R$"},
33+
"BS" : { "code": "BSD" ,"symbol": "$"},
34+
"BT" : { "code": "BTN" ,"symbol": "Nu."},
35+
"BV" : { "code": "NOK" ,"symbol": "kr"},
36+
"BW" : { "code": "BWP" ,"symbol": "P"},
37+
"BY" : { "code": "BYR" ,"symbol": "Br"},
38+
"BZ" : { "code": "BZD" ,"symbol": "BZ$"},
39+
"CA" : { "code": "CAD" ,"symbol": "$"},
40+
"CC" : { "code": "AUD" ,"symbol": "$"},
41+
"CD" : { "code": "CDF" ,"symbol": "FC"},
42+
"CF" : { "code": "XAF" ,"symbol": "FCFA"},
43+
"CG" : { "code": "XAF" ,"symbol": "FCFA"},
44+
"CH" : { "code": "CHF" ,"symbol": "CHF"},
45+
"CI" : { "code": "XOF" ,"symbol": "CFA"},
46+
"CK" : { "code": "NZD" ,"symbol": "$"},
47+
"CL" : { "code": "CLP" ,"symbol": "$"},
48+
"CM" : { "code": "XAF" ,"symbol": "FCFA"},
49+
"CN" : { "code": "CNY" ,"symbol": "¥"},
50+
"CO" : { "code": "COP" ,"symbol": "$"},
51+
"CR" : { "code": "CRC" ,"symbol": ""},
52+
"CU" : { "code": "CUP" ,"symbol": ""},
53+
"CV" : { "code": "CVE" ,"symbol": "$"},
54+
"CW" : { "code": "ANG" ,"symbol": "ƒ"},
55+
"CX" : { "code": "AUD" ,"symbol": "$"},
56+
"CY" : { "code": "EUR" ,"symbol": ""},
57+
"CZ" : { "code": "CZK" ,"symbol": ""},
58+
"DE" : { "code": "EUR" ,"symbol": ""},
59+
"DJ" : { "code": "DJF" ,"symbol": "Fdj"},
60+
"DK" : { "code": "DKK" ,"symbol": "kr"},
61+
"DM" : { "code": "XCD" ,"symbol": "$"},
62+
"DO" : { "code": "DOP" ,"symbol": "RD$"},
63+
"DZ" : { "code": "DZD" ,"symbol": "دج"},
64+
"EC" : { "code": "USD" ,"symbol": "$"},
65+
"EE" : { "code": "EUR" ,"symbol": ""},
66+
"EG" : { "code": "EGP" ,"symbol": "£"},
67+
"EH" : { "code": "MAD" ,"symbol": "MAD"},
68+
"ER" : { "code": "ERN" ,"symbol": "Nfk"},
69+
"ES" : { "code": "EUR" ,"symbol": ""},
70+
"ET" : { "code": "ETB" ,"symbol": "Br"},
71+
"FI" : { "code": "EUR" ,"symbol": ""},
72+
"FJ" : { "code": "FJD" ,"symbol": "$"},
73+
"FK" : { "code": "FKP" ,"symbol": "£"},
74+
"FM" : { "code": "USD" ,"symbol": "$"},
75+
"FO" : { "code": "DKK" ,"symbol": "kr"},
76+
"FR" : { "code": "EUR" ,"symbol": ""},
77+
"GA" : { "code": "XAF" ,"symbol": "FCFA"},
78+
"GB" : { "code": "GBP" ,"symbol": "£"},
79+
"GD" : { "code": "XCD" ,"symbol": "$"},
80+
"GE" : { "code": "GEL" ,"symbol": ""},
81+
"GF" : { "code": "EUR" ,"symbol": ""},
82+
"GG" : { "code": "GBP" ,"symbol": "£"},
83+
"GH" : { "code": "GHS" ,"symbol": "GH₵"},
84+
"GI" : { "code": "GIP" ,"symbol": "£"},
85+
"GL" : { "code": "DKK" ,"symbol": "kr"},
86+
"GM" : { "code": "GMD" ,"symbol": "D"},
87+
"GN" : { "code": "GNF" ,"symbol": "FG"},
88+
"GP" : { "code": "EUR" ,"symbol": ""},
89+
"GQ" : { "code": "XAF" ,"symbol": "FCFA"},
90+
"GR" : { "code": "EUR" ,"symbol": ""},
91+
"GS" : { "code": "GBP" ,"symbol": "£"},
92+
"GT" : { "code": "GTQ" ,"symbol": "Q"},
93+
"GU" : { "code": "USD" ,"symbol": "$"},
94+
"GW" : { "code": "XOF" ,"symbol": "CFA"},
95+
"GY" : { "code": "GYD" ,"symbol": "$"},
96+
"HK" : { "code": "HKD" ,"symbol": "$"},
97+
"HM" : { "code": "AUD" ,"symbol": "$"},
98+
"HN" : { "code": "HNL" ,"symbol": "L"},
99+
"HR" : { "code": "HRK" ,"symbol": "kn"},
100+
"HT" : { "code": "HTG" ,"symbol": "G"},
101+
"HU" : { "code": "HUF" ,"symbol": "Ft"},
102+
"ID" : { "code": "IDR" ,"symbol": "Rp"},
103+
"IE" : { "code": "EUR" ,"symbol": ""},
104+
"IL" : { "code": "ILS" ,"symbol": ""},
105+
"IM" : { "code": "GBP" ,"symbol": "£"},
106+
"IN" : { "code": "INR" ,"symbol": ""},
107+
"IO" : { "code": "USD" ,"symbol": "$"},
108+
"IQ" : { "code": "IQD" ,"symbol": "ع.د"},
109+
"IR" : { "code": "IRR" ,"symbol": ""},
110+
"IS" : { "code": "ISK" ,"symbol": "kr"},
111+
"IT" : { "code": "EUR" ,"symbol": ""},
112+
"JE" : { "code": "GBP" ,"symbol": "£"},
113+
"JM" : { "code": "JMD" ,"symbol": "J$"},
114+
"JO" : { "code": "JOD" ,"symbol": "JD"},
115+
"JP" : { "code": "JPY" ,"symbol": "¥"},
116+
"KE" : { "code": "KES" ,"symbol": "KSh"},
117+
"KG" : { "code": "KGS" ,"symbol": "лв"},
118+
"KH" : { "code": "KHR" ,"symbol": ""},
119+
"KI" : { "code": "AUD" ,"symbol": "$"},
120+
"KM" : { "code": "KMF" ,"symbol": "CF"},
121+
"KN" : { "code": "XCD" ,"symbol": "$"},
122+
"KP" : { "code": "KPW" ,"symbol": ""},
123+
"KR" : { "code": "KRW" ,"symbol": ""},
124+
"KW" : { "code": "KWD" ,"symbol": "KD"},
125+
"KY" : { "code": "KYD" ,"symbol": "$"},
126+
"KZ" : { "code": "KZT" ,"symbol": ""},
127+
"LA" : { "code": "LAK" ,"symbol": ""},
128+
"LB" : { "code": "LBP" ,"symbol": "£"},
129+
"LC" : { "code": "XCD" ,"symbol": "$"},
130+
"LI" : { "code": "CHF" ,"symbol": "CHF"},
131+
"LK" : { "code": "LKR" ,"symbol": ""},
132+
"LR" : { "code": "LRD" ,"symbol": "$"},
133+
"LS" : { "code": "LSL" ,"symbol": "M"},
134+
"LT" : { "code": "LTL" ,"symbol": "Lt"},
135+
"LU" : { "code": "EUR" ,"symbol": ""},
136+
"LV" : { "code": "EUR" ,"symbol": ""},
137+
"LY" : { "code": "LYD" ,"symbol": "LD"},
138+
"MA" : { "code": "MAD" ,"symbol": "MAD"},
139+
"MC" : { "code": "EUR" ,"symbol": ""},
140+
"MD" : { "code": "MDL" ,"symbol": "lei"},
141+
"ME" : { "code": "EUR" ,"symbol": ""},
142+
"MF" : { "code": "EUR" ,"symbol": ""},
143+
"MG" : { "code": "MGA" ,"symbol": "Ar"},
144+
"MH" : { "code": "USD" ,"symbol": "$"},
145+
"MK" : { "code": "MKD" ,"symbol": "ден"},
146+
"ML" : { "code": "XOF" ,"symbol": "CFA"},
147+
"MM" : { "code": "MMK" ,"symbol": "K"},
148+
"MN" : { "code": "MNT" ,"symbol": ""},
149+
"MO" : { "code": "MOP" ,"symbol": "MOP$"},
150+
"MP" : { "code": "USD" ,"symbol": "$"},
151+
"MQ" : { "code": "EUR" ,"symbol": ""},
152+
"MR" : { "code": "MRO" ,"symbol": "UM"},
153+
"MS" : { "code": "XCD" ,"symbol": "$"},
154+
"MT" : { "code": "EUR" ,"symbol": ""},
155+
"MU" : { "code": "MUR" ,"symbol": ""},
156+
"MV" : { "code": "MVR" ,"symbol": "Rf"},
157+
"MW" : { "code": "MWK" ,"symbol": "MK"},
158+
"MX" : { "code": "MXN" ,"symbol": "$"},
159+
"MY" : { "code": "MYR" ,"symbol": "RM"},
160+
"MZ" : { "code": "MZN" ,"symbol": "MT"},
161+
"NA" : { "code": "NAD" ,"symbol": "$"},
162+
"NC" : { "code": "XPF" ,"symbol": ""},
163+
"NE" : { "code": "XOF" ,"symbol": "CFA"},
164+
"NF" : { "code": "AUD" ,"symbol": "$"},
165+
"NG" : { "code": "NGN" ,"symbol": ""},
166+
"NI" : { "code": "NIO" ,"symbol": "C$"},
167+
"NL" : { "code": "EUR" ,"symbol": ""},
168+
"NO" : { "code": "NOK" ,"symbol": "kr"},
169+
"NP" : { "code": "NPR" ,"symbol": ""},
170+
"NR" : { "code": "AUD" ,"symbol": "$"},
171+
"NU" : { "code": "NZD" ,"symbol": "$"},
172+
"NZ" : { "code": "NZD" ,"symbol": "$"},
173+
"OM" : { "code": "OMR" ,"symbol": ""},
174+
"PA" : { "code": "PAB" ,"symbol": "B/."},
175+
"PE" : { "code": "PEN" ,"symbol": "S/."},
176+
"PF" : { "code": "XPF" ,"symbol": ""},
177+
"PG" : { "code": "PGK" ,"symbol": "K"},
178+
"PH" : { "code": "PHP" ,"symbol": ""},
179+
"PK" : { "code": "PKR" ,"symbol": ""},
180+
"PL" : { "code": "PLN" ,"symbol": ""},
181+
"PM" : { "code": "EUR" ,"symbol": ""},
182+
"PN" : { "code": "NZD" ,"symbol": "$"},
183+
"PR" : { "code": "USD" ,"symbol": "$"},
184+
"PS" : { "code": "ILS" ,"symbol": ""},
185+
"PT" : { "code": "EUR" ,"symbol": ""},
186+
"PW" : { "code": "USD" ,"symbol": "$"},
187+
"PY" : { "code": "PYG" ,"symbol": "Gs"},
188+
"QA" : { "code": "QAR" ,"symbol": ""},
189+
"RE" : { "code": "EUR" ,"symbol": ""},
190+
"RO" : { "code": "RON" ,"symbol": "lei"},
191+
"RS" : { "code": "RSD" ,"symbol": "Дин."},
192+
"RU" : { "code": "RUB" ,"symbol": ""},
193+
"RW" : { "code": "RWF" ,"symbol": "R₣"},
194+
"SA" : { "code": "SAR" ,"symbol": ""},
195+
"SB" : { "code": "SBD" ,"symbol": "$"},
196+
"SC" : { "code": "SCR" ,"symbol": ""},
197+
"SD" : { "code": "SDG" ,"symbol": "ج.س."},
198+
"SE" : { "code": "SEK" ,"symbol": "kr"},
199+
"SG" : { "code": "SGD" ,"symbol": "S$"},
200+
"SH" : { "code": "SHP" ,"symbol": "£"},
201+
"SI" : { "code": "EUR" ,"symbol": ""},
202+
"SJ" : { "code": "NOK" ,"symbol": "kr"},
203+
"SK" : { "code": "EUR" ,"symbol": ""},
204+
"SL" : { "code": "SLL" ,"symbol": "Le"},
205+
"SM" : { "code": "EUR" ,"symbol": ""},
206+
"SN" : { "code": "XOF" ,"symbol": "CFA"},
207+
"SO" : { "code": "SOS" ,"symbol": "S"},
208+
"SR" : { "code": "SRD" ,"symbol": "$"},
209+
"SS" : { "code": "SSP" ,"symbol": "£"},
210+
"ST" : { "code": "STD" ,"symbol": "Db"},
211+
"SV" : { "code": "USD" ,"symbol": "$"},
212+
"SX" : { "code": "ANG" ,"symbol": "ƒ"},
213+
"SY" : { "code": "SYP" ,"symbol": "£"},
214+
"SZ" : { "code": "SZL" ,"symbol": "E"},
215+
"TC" : { "code": "USD" ,"symbol": "$"},
216+
"TD" : { "code": "XAF" ,"symbol": "FCFA"},
217+
"TF" : { "code": "EUR" ,"symbol": ""},
218+
"TG" : { "code": "XOF" ,"symbol": "CFA"},
219+
"TH" : { "code": "THB" ,"symbol": "฿"},
220+
"TJ" : { "code": "TJS" ,"symbol": "SM"},
221+
"TK" : { "code": "NZD" ,"symbol": "$"},
222+
"TL" : { "code": "USD" ,"symbol": "$"},
223+
"TM" : { "code": "TMT" ,"symbol": "T"},
224+
"TN" : { "code": "TND" ,"symbol": "د.ت"},
225+
"TO" : { "code": "TOP" ,"symbol": "T$"},
226+
"TR" : { "code": "TRY" ,"symbol": ""},
227+
"TT" : { "code": "TTD" ,"symbol": "TT$"},
228+
"TV" : { "code": "AUD" ,"symbol": "$"},
229+
"TW" : { "code": "TWD" ,"symbol": "NT$"},
230+
"TZ" : { "code": "TZS" ,"symbol": "TSh"},
231+
"UA" : { "code": "UAH" ,"symbol": ""},
232+
"UG" : { "code": "UGX" ,"symbol": "USh"},
233+
"UM" : { "code": "USD" ,"symbol": "$"},
234+
"US" : { "code": "USD" ,"symbol": "$"},
235+
"UY" : { "code": "UYU" ,"symbol": "$U"},
236+
"UZ" : { "code": "UZS" ,"symbol": "лв"},
237+
"VA" : { "code": "EUR" ,"symbol": ""},
238+
"VC" : { "code": "XCD" ,"symbol": "$"},
239+
"VE" : { "code": "VEF" ,"symbol": "Bs"},
240+
"VG" : { "code": "USD" ,"symbol": "$"},
241+
"VI" : { "code": "USD" ,"symbol": "$"},
242+
"VN" : { "code": "VND" ,"symbol": ""},
243+
"VU" : { "code": "VUV" ,"symbol": "VT"},
244+
"WF" : { "code": "XPF" ,"symbol": ""},
245+
"WS" : { "code": "WST" ,"symbol": "WS$"},
246+
"XK" : { "code": "EUR" ,"symbol": ""},
247+
"YE" : { "code": "YER" ,"symbol": ""},
248+
"YT" : { "code": "EUR" ,"symbol": ""},
249+
"ZA" : { "code": "ZAR" ,"symbol": "R"},
250+
"ZM" : { "code": "ZMK" ,"symbol": "ZK"},
251+
"ZW" : { "code": "ZWL" ,"symbol": "$"}
252+
}

ipinfo/handler.py

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
COUNTRY_FILE_DEFAULT,
1919
COUNTRY_EU_FILE_DEFAULT,
2020
COUNTRY_FLAG_FILE_DEFAULT,
21+
COUNTRY_CURRENCY_FILE_DEFAULT,
2122
BATCH_MAX_SIZE,
2223
CACHE_MAXSIZE,
2324
CACHE_TTL,
@@ -62,6 +63,13 @@ def __init__(self, access_token=None, **kwargs):
6263
else COUNTRY_FLAG_FILE_DEFAULT
6364
)
6465

66+
# load countries currency file
67+
self.countries_currencies = handler_utils.read_json_file(
68+
kwargs.get("countries_currencies_file")
69+
if kwargs.get("countries_currencies_file")
70+
else COUNTRY_CURRENCY_FILE_DEFAULT
71+
)
72+
6573
# setup req opts
6674
self.request_options = kwargs.get("request_options", {})
6775
if "timeout" not in self.request_options:
@@ -118,7 +126,11 @@ def getDetails(self, ip_address=None, timeout=None):
118126

119127
# format & cache
120128
handler_utils.format_details(
121-
details, self.countries, self.eu_countries, self.countries_flags
129+
details,
130+
self.countries,
131+
self.eu_countries,
132+
self.countries_flags,
133+
self.countries_currencies,
122134
)
123135
self.cache[cache_key(ip_address)] = details
124136

@@ -239,7 +251,11 @@ def getBatchDetails(
239251
for detail in result.values():
240252
if isinstance(detail, dict):
241253
handler_utils.format_details(
242-
detail, self.countries, self.eu_countries, self.countries_flags
254+
detail,
255+
self.countries,
256+
self.eu_countries,
257+
self.countries_flags,
258+
self.countries_currencies,
243259
)
244260

245261
return result

ipinfo/handler_async.py

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
COUNTRY_EU_FILE_DEFAULT,
2020
COUNTRY_FILE_DEFAULT,
2121
COUNTRY_FLAG_FILE_DEFAULT,
22+
COUNTRY_CURRENCY_FILE_DEFAULT,
2223
BATCH_MAX_SIZE,
2324
CACHE_MAXSIZE,
2425
CACHE_TTL,
@@ -63,6 +64,13 @@ def __init__(self, access_token=None, **kwargs):
6364
else COUNTRY_FLAG_FILE_DEFAULT
6465
)
6566

67+
# load countries currency file
68+
self.countries_currencies = handler_utils.read_json_file(
69+
kwargs.get("countries_currencies_file")
70+
if kwargs.get("countries_currencies_file")
71+
else COUNTRY_CURRENCY_FILE_DEFAULT
72+
)
73+
6674
# setup req opts
6775
self.request_options = kwargs.get("request_options", {})
6876
if "timeout" not in self.request_options:
@@ -141,7 +149,11 @@ async def getDetails(self, ip_address=None, timeout=None):
141149

142150
# format & cache
143151
handler_utils.format_details(
144-
details, self.countries, self.eu_countries, self.countries_flags
152+
details,
153+
self.countries,
154+
self.eu_countries,
155+
self.countries_flags,
156+
self.countries_currencies,
145157
)
146158
self.cache[cache_key(ip_address)] = details
147159

@@ -296,7 +308,11 @@ async def _do_batch_req(
296308
for ip_address, details in json_resp.items():
297309
if isinstance(details, dict):
298310
handler_utils.format_details(
299-
details, self.countries, self.eu_countries, self.countries_flags
311+
details,
312+
self.countries,
313+
self.eu_countries,
314+
self.countries_flags,
315+
self.countries_currencies,
300316
)
301317
self.cache[cache_key(ip_address)] = details
302318

ipinfo/handler_utils.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020

2121
COUNTRY_FLAG_FILE_DEFAULT = "flags.json"
2222

23+
COUNTRY_CURRENCY_FILE_DEFAULT = "currency.json"
24+
2325
# The max amount of IPs allowed by the API per batch request.
2426
BATCH_MAX_SIZE = 1000
2527

@@ -55,13 +57,20 @@ def get_headers(access_token):
5557
return headers
5658

5759

58-
def format_details(details, countries, eu_countries, countries_flags):
60+
def format_details(
61+
details, countries, eu_countries, countries_flags, countries_currencies
62+
):
5963
"""
6064
Format details given a countries object.
6165
"""
6266
details["country_name"] = countries.get(details.get("country"))
6367
details["isEU"] = details.get("country") in eu_countries
64-
details["country_flag"] = copy.deepcopy(countries_flags.get(details.get("country")))
68+
details["country_flag"] = copy.deepcopy(
69+
countries_flags.get(details.get("country"))
70+
)
71+
details["country_currency"] = copy.deepcopy(
72+
countries_currencies.get(details.get("country"))
73+
)
6574
details["latitude"], details["longitude"] = read_coords(details.get("loc"))
6675

6776

tests/handler_async_test.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ async def test_get_details():
4646
country_flag = details.country_flag
4747
assert country_flag["emoji"] == "🇺🇸"
4848
assert country_flag["unicode"] == "U+1F1FA U+1F1F8"
49+
country_currency = details.country_currency
50+
assert country_currency["code"] == "USD"
51+
assert country_currency["symbol"] == "$"
4952
assert details.loc == "37.4056,-122.0775"
5053
assert details.latitude == "37.4056"
5154
assert details.longitude == "-122.0775"

0 commit comments

Comments
 (0)