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
IPInfo-Python is a lightweight wrapper for the IPInfo API, which provides up-to-date IP address data.
4
+
`ipinfo_wrapper` is a lightweight wrapper for the IPInfo API, which provides up-to-date IP address data.
5
5
6
6
.. contents::
7
7
@@ -10,11 +10,11 @@ IPInfo-Python is a lightweight wrapper for the IPInfo API, which provides up-to-
10
10
Usage
11
11
=====
12
12
13
-
The `IPInfo.getDetails()` method accepts an IP address as an optional, positional argument. If no IP address is specified, the API will return data for the IP address from which it receives the request.
13
+
The `Handler.getDetails()` method accepts an IP address as an optional, positional argument. If no IP address is specified, the API will return data for the IP address from which it receives the request.
The IPInfo library can be authenticated with your IPInfo API token, which is passed in as a positional argument. It also works without an authentication token, but in a more limited capacity.
It's possible to use a custom cache by creating a child class of the `CacheInterface <https://github.com/jhtimmins/ipinfo-python/blob/master/cache/interface.py>`_ class and passing this into the handler object with the `cache` keyword argument. FYI this is known as `the Strategy Pattern <https://sourcemaking.com/design_patterns/strategy>`_.
0 commit comments