File tree Expand file tree Collapse file tree 5 files changed +21
-2
lines changed
Expand file tree Collapse file tree 5 files changed +21
-2
lines changed Original file line number Diff line number Diff line change 1+ """
2+ A default cache implementation that uses `cachetools` for an in-memory LRU cache.
3+ """
4+
15import cachetools
26from .interface import CacheInterface
37
Original file line number Diff line number Diff line change 1+ """
2+ Abstract interface for caching IPinfo data.
3+ """
4+
15import abc
26
37
Original file line number Diff line number Diff line change 1+ """
2+ Details returned by the IPinfo service.
3+ """
4+
15class Details :
26 """Encapsulates data for single IP address."""
37
Original file line number Diff line number Diff line change 1+ """
2+ Exceptions thrown by the IPinfo service.
3+ """
4+
15class RequestQuotaExceededError (Exception ):
26 """Error indicating that users monthly request quota has been passed."""
37 pass
Original file line number Diff line number Diff line change 1+ """
2+ Main API client handler for fetching data from the IPinfo service.
3+ """
4+
15import ipaddress
26import json
3- import operator
47import os
58import requests
69import sys
912from .exceptions import RequestQuotaExceededError
1013
1114
12- class Handler () :
15+ class Handler :
1316 """
1417 Allows client to request data for specified IP address. Instantiates and
1518 and maintains access to cache.
You can’t perform that action at this time.
0 commit comments