- The SDK version is available via
ipinfo.versionasSDK_VERSION. - Most private functions on all handlers (i.e. those that start with
_) are now moved toipinfo.handler_utils. - All constants that existed on handlers (i.e.
REQUEST_TIMEOUT_DEFAULT) are now moved toipinfo.handler_utils. - Cache behavior for the synchronous handler is a bit different now; the item actually cached is the item after formatting is complete, rather than before.
- Both the sync and async handlers have the following improvements:
timeoutcan be specified as a keyword-arg to getDetails to optionally override the client-level timeout.- getBatchDetails now has no limit to the size of the
ip_addressesinput list. It will chunk the list internally and make requests against the batch endpoint in a way that doesn't exceed the API's own limits. - getBatchDetails now accepts the new options
batch_size,timeout_per_batch,timeout_totalandraise_on_fail. Please see the documentation for details on what each of these do.
- PR #32
All EOL Python versions are no longer supported; currently, Python 3.6 or
greater is now required.
An asynchronous handler is available from
getHandlerAsyncwhich returns anAsyncHandlerwhich uses aiohttp.
- PR #19
DefaultCache requires keyword arguments now instead of positional arguments,
in particular
maxsizeandttl.
- PR #19
Issue #18
An issue with the handler not being created if you provide your own custom
maxsize/ttlvalues has been fixed.
- Released a batch ops function on the handler called
getBatchDetailswhich accepts a list of IP addresses (or an IP address plus a path to more specific details, e.g.8.8.8.8/country). See documentation on batch operations in the README for more details.
-
Fix Issue #8. Deleted the
ip_addresskey in the details object which was of typeIPv4Address.This allows serializing the details object (into JSON or something else) without errors by default.
Users who expected that object type can simply pull the
ipkey instead and turn it into anIPv4Addressobject on their own.