Skip to content

Commit 7b539c2

Browse files
authored
Merge pull request #125 from maxmind/greg/product-renaming
Update service names
2 parents 63b6a7e + 0030a97 commit 7b539c2

File tree

8 files changed

+58
-61
lines changed

8 files changed

+58
-61
lines changed

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[submodule "tests/data"]
22
path = tests/data
3-
url = git://github.com/maxmind/MaxMind-DB.git
3+
url = https://github.com/maxmind/MaxMind-DB

README.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Web Service Usage
4646
To use this API, you first construct either a ``geoip2.webservice.Client`` or
4747
``geoip2.webservice.AsyncClient``, passing your MaxMind ``account_id`` and
4848
``license_key`` to the constructor. To use the GeoLite2 web service instead of
49-
GeoIP2 Precision, set the optional ``host`` keyword argument to
49+
the GeoIP2 web service, set the optional ``host`` keyword argument to
5050
``geolite.info``.
5151

5252
After doing this, you may call the method corresponding to request type
@@ -68,7 +68,7 @@ Sync Web Service Example
6868
>>> # This creates a Client object that can be reused across requests.
6969
>>> # Replace "42" with your account ID and "license_key" with your license
7070
>>> # key. Set the "host" keyword argument to "geolite.info" to use the
71-
>>> # GeoLite2 web service instead of GeoIP2 Precision.
71+
>>> # GeoLite2 web service instead of the GeoIP2 web service.
7272
>>> with geoip2.webservice.Client(42, 'license_key') as client:
7373
>>>
7474
>>> # Replace "city" with the method corresponding to the web service
@@ -118,7 +118,7 @@ Async Web Service Example
118118
>>> #
119119
>>> # Replace "42" with your account ID and "license_key" with your license
120120
>>> # key. Set the "host" keyword argument to "geolite.info" to use the
121-
>>> # GeoLite2 web service instead of GeoIP2 Precision.
121+
>>> # GeoLite2 web service instead of the GeoIP2 web service.
122122
>>> async with geoip2.webservice.AsyncClient(42, 'license_key') as client:
123123
>>>
124124
>>> # Replace "city" with the method corresponding to the web service
@@ -158,7 +158,7 @@ Web Service Client Exceptions
158158
-----------------------------
159159

160160
For details on the possible errors returned by the web service itself, see
161-
https://dev.maxmind.com/geoip/docs/web-services?lang=en for the GeoIP2 Precision web
161+
https://dev.maxmind.com/geoip/docs/web-services?lang=en for the GeoIP2 web
162162
service docs.
163163

164164
If the web service returns an explicit error document, this is thrown as a

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050
# General information about the project.
5151
project = "geoip2"
52-
copyright = "2013-2021, MaxMind, Inc."
52+
copyright = "2013-2022, MaxMind, Inc."
5353

5454
# The version info for the project you're documenting, acts as replacement for
5555
# |version| and |release|, also used in various other places throughout the

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ Indices and tables
3838
* :ref:`modindex`
3939
* :ref:`search`
4040

41-
:copyright: (c) 2013-2021 by MaxMind, Inc.
41+
:copyright: (c) 2013-2022 by MaxMind, Inc.
4242
:license: Apache License, Version 2.0
4343

geoip2/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
__version__ = "4.5.0"
55
__author__ = "Gregory Oschwald"
66
__license__ = "Apache License, Version 2.0"
7-
__copyright__ = "Copyright (c) 2013-2021 Maxmind, Inc."
7+
__copyright__ = "Copyright (c) 2013-2022 Maxmind, Inc."

geoip2/models.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121

2222
class Country(SimpleEquality):
23-
"""Model for the GeoIP2 Precision: Country and the GeoIP2 Country database.
23+
"""Model for the Country web service and Country database.
2424
2525
This class provides the following attributes:
2626
@@ -105,7 +105,7 @@ def __repr__(self) -> str:
105105

106106

107107
class City(Country):
108-
"""Model for the GeoIP2 Precision: City and the GeoIP2 City database.
108+
"""Model for the City Plus web service and the City database.
109109
110110
.. attribute:: city
111111
@@ -193,7 +193,7 @@ def __init__(
193193

194194

195195
class Insights(City):
196-
"""Model for the GeoIP2 Precision: Insights web service endpoint.
196+
"""Model for the GeoIP2 Insights web service.
197197
198198
.. attribute:: city
199199

geoip2/records.py

Lines changed: 30 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class City(PlaceRecord):
6161
6262
A value from 0-100 indicating MaxMind's
6363
confidence that the city is correct. This attribute is only available
64-
from the Insights end point and the GeoIP2 Enterprise database.
64+
from the Insights end point and the Enterprise database.
6565
6666
:type: int
6767
@@ -169,7 +169,7 @@ class Country(PlaceRecord):
169169
170170
A value from 0-100 indicating MaxMind's confidence that
171171
the country is correct. This attribute is only available from the
172-
Insights end point and the GeoIP2 Enterprise database.
172+
Insights end point and the Enterprise database.
173173
174174
:type: int
175175
@@ -245,7 +245,7 @@ class RepresentedCountry(Country):
245245
246246
A value from 0-100 indicating MaxMind's confidence that
247247
the country is correct. This attribute is only available from the
248-
Insights end point and the GeoIP2 Enterprise database.
248+
Insights end point and the Enterprise database.
249249
250250
:type: int
251251
@@ -449,8 +449,7 @@ class Postal(Record):
449449
450450
A value from 0-100 indicating
451451
MaxMind's confidence that the postal code is correct. This attribute is
452-
only available from the Insights end point and the GeoIP2 Enterprise
453-
database.
452+
only available from the Insights end point and the Enterprise database.
454453
455454
:type: int
456455
@@ -479,8 +478,7 @@ class Subdivision(PlaceRecord):
479478
480479
This is a value from 0-100 indicating MaxMind's
481480
confidence that the subdivision is correct. This attribute is only
482-
available from the Insights end point and the GeoIP2 Enterprise
483-
database.
481+
available from the Insights end point and the Enterprise database.
484482
485483
:type: int
486484
@@ -586,17 +584,16 @@ class Traits(Record):
586584
The `autonomous system
587585
number <http://en.wikipedia.org/wiki/Autonomous_system_(Internet)>`_
588586
associated with the IP address. This attribute is only available from
589-
the City and Insights web service end points and the GeoIP2 Enterprise
590-
database.
587+
the City Plus and Insights web services and the Enterprise database.
591588
592589
:type: int
593590
594591
.. attribute:: autonomous_system_organization
595592
596593
The organization associated with the registered `autonomous system
597594
number <http://en.wikipedia.org/wiki/Autonomous_system_(Internet)>`_ for
598-
the IP address. This attribute is only available from the City and
599-
Insights web service end points and the GeoIP2 Enterprise database.
595+
the IP address. This attribute is only available from the City Plus and
596+
Insights web service end points and the Enterprise database.
600597
601598
:type: str
602599
@@ -611,7 +608,7 @@ class Traits(Record):
611608
612609
Additional values may be added in the future.
613610
614-
This attribute is only available in the GeoIP2 Enterprise database.
611+
This attribute is only available in the Enterprise database.
615612
616613
:type: str
617614
@@ -620,7 +617,7 @@ class Traits(Record):
620617
The second level domain associated with the
621618
IP address. This will be something like "example.com" or
622619
"example.co.uk", not "foo.example.com". This attribute is only available
623-
from the City and Insights web service end points and the GeoIP2
620+
from the City Plus and Insights web service end points and the
624621
Enterprise database.
625622
626623
:type: str
@@ -638,7 +635,7 @@ class Traits(Record):
638635
.. attribute:: is_anonymous
639636
640637
This is true if the IP address belongs to any sort of anonymous network.
641-
This attribute is only available from GeoIP2 Precision Insights.
638+
This attribute is only available from Insights.
642639
643640
:type: bool
644641
@@ -662,38 +659,38 @@ class Traits(Record):
662659
them, we will likely only flag their IP ranges using the
663660
``is_hosting_provider`` attribute.
664661
665-
This attribute is only available from GeoIP2 Precision Insights.
662+
This attribute is only available from Insights.
666663
667664
:type: bool
668665
669666
.. attribute:: is_hosting_provider
670667
671668
This is true if the IP address belongs to a hosting or VPN provider
672669
(see description of ``is_anonymous_vpn`` attribute).
673-
This attribute is only available from GeoIP2 Precision Insights.
670+
This attribute is only available from Insights.
674671
675672
:type: bool
676673
677674
.. attribute:: is_legitimate_proxy
678675
679676
This attribute is true if MaxMind believes this IP address to be a
680677
legitimate proxy, such as an internal VPN used by a corporation. This
681-
attribute is only available in the GeoIP2 Enterprise database.
678+
attribute is only available in the Enterprise database.
682679
683680
:type: bool
684681
685682
.. attribute:: is_public_proxy
686683
687684
This is true if the IP address belongs to a public proxy. This attribute
688-
is only available from GeoIP2 Precision Insights.
685+
is only available from Insights.
689686
690687
:type: bool
691688
692689
.. attribute:: is_residential_proxy
693690
694691
This is true if the IP address is on a suspected anonymizing network
695692
and belongs to a residential ISP. This attribute is only available from
696-
GeoIP2 Precision Insights.
693+
Insights.
697694
698695
:type: bool
699696
@@ -714,33 +711,33 @@ class Traits(Record):
714711
.. attribute:: is_tor_exit_node
715712
716713
This is true if the IP address is a Tor exit node. This attribute is
717-
only available from GeoIP2 Precision Insights.
714+
only available from Insights.
718715
719716
:type: bool
720717
721718
.. attribute:: isp
722719
723720
The name of the ISP associated with the IP address. This attribute is
724-
only available from the City and Insights web service end points and the
725-
GeoIP2 Enterprise database.
721+
only available from the City Plus and Insights web services and the
722+
Enterprise database.
726723
727724
:type: str
728725
729726
.. attribute: mobile_country_code
730727
731728
The `mobile country code (MCC)
732729
<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.
730+
IP address and ISP. This attribute is available from the City Plus and
731+
Insights web services and the Enterprise database.
735732
736733
:type: str
737734
738735
.. attribute: mobile_network_code
739736
740737
The `mobile network code (MNC)
741738
<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.
739+
IP address and ISP. This attribute is available from the City Plus and
740+
Insights web services and the Enterprise database.
744741
745742
:type: str
746743
@@ -755,8 +752,8 @@ class Traits(Record):
755752
.. attribute:: organization
756753
757754
The name of the organization associated with the IP address. This
758-
attribute is only available from the City and Insights web service end
759-
points and the GeoIP2 Enterprise database.
755+
attribute is only available from the City Plus and Insights web services
756+
and the Enterprise database.
760757
761758
:type: str
762759
@@ -769,17 +766,17 @@ class Traits(Record):
769766
thirty.
770767
771768
This indicator can be useful for deciding whether an IP address represents
772-
the same user over time. This attribute is only available from GeoIP2
773-
Precision Insights.
769+
the same user over time. This attribute is only available from
770+
Insights.
774771
775772
:type: float
776773
777774
.. attribute:: user_count
778775
779776
The estimated number of users sharing the IP/network during the past 24
780777
hours. For IPv4, the count is for the individual IP. For IPv6, the count
781-
is for the /64 network. This attribute is only available from GeoIP2
782-
Precision Insights.
778+
is for the /64 network. This attribute is only available from
779+
Insights.
783780
784781
:type: int
785782
@@ -805,7 +802,7 @@ class Traits(Record):
805802
* traveler
806803
807804
This attribute is only available from the Insights end point and the
808-
GeoIP2 Enterprise database.
805+
Enterprise database.
809806
810807
:type: str
811808

geoip2/webservice.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@
33
WebServices Client API
44
============================
55
6-
This class provides a client API for all the GeoIP2 Precision web service end
7-
points. The end points are Country, City, and Insights. Each end point returns
8-
a different set of data about an IP address, with Country returning the least
6+
This class provides a client API for all the GeoIP2 web services. The web
7+
services are Country, City Plus, and Insights. Each service returns a
8+
different set of data about an IP address, with Country returning the least
99
data and Insights the most.
1010
11-
Each web service end point is represented by a different model class, and
12-
these model classes in turn contain multiple record classes. The record
13-
classes have attributes which contain data about the IP address.
11+
Each service is represented by a different model class, and these model
12+
classes in turn contain multiple record classes. The record classes have
13+
attributes which contain data about the IP address.
1414
15-
If the web service does not return a particular piece of data for an IP
16-
address, the associated attribute is not populated.
15+
If the service does not return a particular piece of data for an IP address,
16+
the associated attribute is not populated.
1717
18-
The web service may not return any information for an entire record, in which
18+
The service may not return any information for an entire record, in which
1919
case all of the attributes for that record class will be empty.
2020
2121
SSL
@@ -219,8 +219,8 @@ class AsyncClient(BaseClient):
219219
The following keyword arguments are also accepted:
220220
221221
:param host: The hostname to make a request against. This defaults to
222-
"geoip.maxmind.com". To use the GeoLite2 web service instead of GeoIP2
223-
Precision, set this to "geolite.info".
222+
"geoip.maxmind.com". To use the GeoLite2 web service instead of the
223+
GeoIP2 web service, set this to "geolite.info".
224224
:param locales: This is list of locale codes. This argument will be
225225
passed on to record classes to use when their name properties are
226226
called. The default value is ['en'].
@@ -276,7 +276,7 @@ def __init__( # pylint: disable=too-many-arguments
276276
self._proxy = proxy
277277

278278
async def city(self, ip_address: IPAddress = "me") -> City:
279-
"""Call City endpoint with the specified IP.
279+
"""Call City Plus endpoint with the specified IP.
280280
281281
:param ip_address: IPv4 or IPv6 address as a string. If no
282282
address is provided, the address that the web service is
@@ -307,7 +307,7 @@ async def country(self, ip_address: IPAddress = "me") -> Country:
307307
async def insights(self, ip_address: IPAddress = "me") -> Insights:
308308
"""Call the Insights endpoint with the specified IP.
309309
310-
Insights is only supported by GeoIP2 Precision. The GeoLite2 web
310+
Insights is only supported by the GeoIP2 web service. The GeoLite2 web
311311
service does not support it.
312312
313313
:param ip_address: IPv4 or IPv6 address as a string. If no address
@@ -378,8 +378,8 @@ class Client(BaseClient):
378378
The following keyword arguments are also accepted:
379379
380380
:param host: The hostname to make a request against. This defaults to
381-
"geoip.maxmind.com". To use the GeoLite2 web service instead of GeoIP2
382-
Precision, set this to "geolite.info".
381+
"geoip.maxmind.com". To use the GeoLite2 web service instead of the
382+
GeoIP2 web service, set this to "geolite.info".
383383
:param locales: This is list of locale codes. This argument will be
384384
passed on to record classes to use when their name properties are
385385
called. The default value is ['en'].
@@ -437,7 +437,7 @@ def __init__( # pylint: disable=too-many-arguments
437437
self._proxies = {"https": proxy}
438438

439439
def city(self, ip_address: IPAddress = "me") -> City:
440-
"""Call City endpoint with the specified IP.
440+
"""Call City Plus endpoint with the specified IP.
441441
442442
:param ip_address: IPv4 or IPv6 address as a string. If no
443443
address is provided, the address that the web service is
@@ -465,7 +465,7 @@ def country(self, ip_address: IPAddress = "me") -> Country:
465465
def insights(self, ip_address: IPAddress = "me") -> Insights:
466466
"""Call the Insights endpoint with the specified IP.
467467
468-
Insights is only supported by GeoIP2 Precision. The GeoLite2 web
468+
Insights is only supported by the GeoIP2 web service. The GeoLite2 web
469469
service does not support it.
470470
471471
:param ip_address: IPv4 or IPv6 address as a string. If no address

0 commit comments

Comments
 (0)