@@ -76,7 +76,7 @@ class City(PlaceRecord):
76
76
The name of the city based on the locales list passed to the
77
77
constructor.
78
78
79
- :type: unicode
79
+ :type: str
80
80
81
81
.. attribute:: names
82
82
@@ -117,7 +117,7 @@ class Continent(PlaceRecord):
117
117
A two character continent code like "NA" (North America)
118
118
or "OC" (Oceania).
119
119
120
- :type: unicode
120
+ :type: str
121
121
122
122
.. attribute:: geoname_id
123
123
@@ -130,7 +130,7 @@ class Continent(PlaceRecord):
130
130
Returns the name of the continent based on the locales list passed to
131
131
the constructor.
132
132
133
- :type: unicode
133
+ :type: str
134
134
135
135
.. attribute:: names
136
136
@@ -191,14 +191,14 @@ class Country(PlaceRecord):
191
191
<http://en.wikipedia.org/wiki/ISO_3166-1>`_ alpha code for the
192
192
country.
193
193
194
- :type: unicode
194
+ :type: str
195
195
196
196
.. attribute:: name
197
197
198
198
The name of the country based on the locales list passed to the
199
199
constructor.
200
200
201
- :type: unicode
201
+ :type: str
202
202
203
203
.. attribute:: names
204
204
@@ -266,14 +266,14 @@ class RepresentedCountry(Country):
266
266
The two-character `ISO 3166-1
267
267
<http://en.wikipedia.org/wiki/ISO_3166-1>`_ alpha code for the country.
268
268
269
- :type: unicode
269
+ :type: str
270
270
271
271
.. attribute:: name
272
272
273
273
The name of the country based on the locales list passed to the
274
274
constructor.
275
275
276
- :type: unicode
276
+ :type: str
277
277
278
278
.. attribute:: names
279
279
@@ -289,7 +289,7 @@ class RepresentedCountry(Country):
289
289
country. Currently we only return ``military`` but this could expand to
290
290
include other types in the future.
291
291
292
- :type: unicode
292
+ :type: str
293
293
294
294
"""
295
295
@@ -376,7 +376,7 @@ class Location(Record):
376
376
Zone Database <http://www.iana.org/time-zones>`_, e.g.,
377
377
"America/New_York".
378
378
379
- :type: unicode
379
+ :type: str
380
380
381
381
"""
382
382
@@ -443,7 +443,7 @@ class Postal(Record):
443
443
codes are not available for all countries. In some countries, this will
444
444
only contain part of the postal code.
445
445
446
- :type: unicode
446
+ :type: str
447
447
448
448
.. attribute:: confidence
449
449
@@ -496,14 +496,14 @@ class Subdivision(PlaceRecord):
496
496
contain the subdivision portion of the `ISO 3166-2 code
497
497
<http://en.wikipedia.org/wiki/ISO_3166-2>`_.
498
498
499
- :type: unicode
499
+ :type: str
500
500
501
501
.. attribute:: name
502
502
503
503
The name of the subdivision based on the locales list passed to the
504
504
constructor.
505
505
506
- :type: unicode
506
+ :type: str
507
507
508
508
.. attribute:: names
509
509
@@ -598,7 +598,7 @@ class Traits(Record):
598
598
the IP address. This attribute is only available from the City and
599
599
Insights web service end points and the GeoIP2 Enterprise database.
600
600
601
- :type: unicode
601
+ :type: str
602
602
603
603
.. attribute:: connection_type
604
604
@@ -613,7 +613,7 @@ class Traits(Record):
613
613
614
614
This attribute is only available in the GeoIP2 Enterprise database.
615
615
616
- :type: unicode
616
+ :type: str
617
617
618
618
.. attribute:: domain
619
619
@@ -623,7 +623,7 @@ class Traits(Record):
623
623
from the City and Insights web service end points and the GeoIP2
624
624
Enterprise database.
625
625
626
- :type: unicode
626
+ :type: str
627
627
628
628
.. attribute:: ip_address
629
629
@@ -633,7 +633,7 @@ class Traits(Record):
633
633
running on. If the system is behind a NAT, this may differ from the IP
634
634
address locally assigned to it.
635
635
636
- :type: unicode
636
+ :type: str
637
637
638
638
.. attribute:: is_anonymous
639
639
@@ -713,7 +713,7 @@ class Traits(Record):
713
713
714
714
.. attribute:: is_tor_exit_node
715
715
716
- This is true if the IP address is a Tor exit node. This attribute is
716
+ This is true if the IP address is a Tor exit node. This attribute is
717
717
only available from GeoIP2 Precision Insights.
718
718
719
719
:type: bool
@@ -724,7 +724,25 @@ class Traits(Record):
724
724
only available from the City and Insights web service end points and the
725
725
GeoIP2 Enterprise database.
726
726
727
- :type: unicode
727
+ :type: str
728
+
729
+ .. attribute: mobile_country_code
730
+
731
+ The `mobile country code (MCC)
732
+ <https://en.wikipedia.org/wiki/Mobile_country_code>`_ associated with the
733
+ IP address and ISP. This attribute is available from the City and
734
+ Insights web services and the GeoIP2 Enterprise database.
735
+
736
+ :type: str
737
+
738
+ .. attribute: mobile_network_code
739
+
740
+ The `mobile network code (MNC)
741
+ <https://en.wikipedia.org/wiki/Mobile_country_code>`_ associated with the
742
+ IP address and ISP. This attribute is available from the City and
743
+ Insights web services and the GeoIP2 Enterprise database.
744
+
745
+ :type: str
728
746
729
747
.. attribute:: network
730
748
@@ -740,7 +758,7 @@ class Traits(Record):
740
758
attribute is only available from the City and Insights web service end
741
759
points and the GeoIP2 Enterprise database.
742
760
743
- :type: unicode
761
+ :type: str
744
762
745
763
.. attribute:: static_ip_score
746
764
@@ -789,7 +807,7 @@ class Traits(Record):
789
807
This attribute is only available from the Insights end point and the
790
808
GeoIP2 Enterprise database.
791
809
792
- :type: unicode
810
+ :type: str
793
811
794
812
"""
795
813
@@ -808,6 +826,8 @@ class Traits(Record):
808
826
is_tor_exit_node : bool
809
827
isp : Optional [str ]
810
828
ip_address : Optional [str ]
829
+ mobile_country_code : Optional [str ]
830
+ mobile_network_code : Optional [str ]
811
831
organization : Optional [str ]
812
832
static_ip_score : Optional [float ]
813
833
user_count : Optional [int ]
@@ -838,6 +858,8 @@ def __init__(
838
858
static_ip_score : Optional [float ] = None ,
839
859
user_count : Optional [int ] = None ,
840
860
user_type : Optional [str ] = None ,
861
+ mobile_country_code : Optional [str ] = None ,
862
+ mobile_network_code : Optional [str ] = None ,
841
863
** _ ,
842
864
) -> None :
843
865
self .autonomous_system_number = autonomous_system_number
@@ -854,6 +876,8 @@ def __init__(
854
876
self .is_satellite_provider = is_satellite_provider
855
877
self .is_tor_exit_node = is_tor_exit_node
856
878
self .isp = isp
879
+ self .mobile_country_code = mobile_country_code
880
+ self .mobile_network_code = mobile_network_code
857
881
self .organization = organization
858
882
self .static_ip_score = static_ip_score
859
883
self .user_type = user_type
0 commit comments