Skip to content

Commit 7264d1a

Browse files
author
jhtimmins
authored
Change single back ticks to double.
1 parent de4aed1 commit 7264d1a

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

README.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
The official Python library for the `IPinfo <https://ipinfo.io/>`_ API.
22
###########################################################################
33

4-
`ipinfo_wrapper` 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.
55

66
.. contents::
77

@@ -10,7 +10,7 @@ The official Python library for the `IPinfo <https://ipinfo.io/>`_ API.
1010
Usage
1111
=====
1212

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.
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.
1414

1515
>>> import ipinfo_wrapper
1616
>>> access_token = '123456789abc'
@@ -32,7 +32,7 @@ The IPinfo library can be authenticated with your IPinfo API token, which is pas
3232

3333
Details Data
3434
=============
35-
`handler.getDetails()` will return a `Details` object that contains all fields listed `IPinfo developer docs <https://ipinfo.io/developers/responses#full-response>`_ with a few minor additions. Properties can be accessed directly.
35+
``handler.getDetails()`` will return a ``Details`` object that contains all fields listed `IPinfo developer docs <https://ipinfo.io/developers/responses#full-response>`_ with a few minor additions. Properties can be accessed directly.
3636

3737
>>> details.hostname
3838
cpe-104-175-221-247.socal.res.rr.com
@@ -41,7 +41,7 @@ cpe-104-175-221-247.socal.res.rr.com
4141
Country Name
4242
------------
4343

44-
`details.country_name` will return the country name, as supplied by the `countries.json` file. See below for instructions on changing that file for use with non-English languages. `details.country` will still return country code.
44+
``details.country_name`` will return the country name, as supplied by the ``countries.json`` file. See below for instructions on changing that file for use with non-English languages. ``details.country`` will still return country code.
4545

4646
>>> details.country
4747
US
@@ -51,7 +51,7 @@ United States
5151
IP Address
5252
----------
5353

54-
`details.ip_address` will return the an `ipaddress` object from the `Python Standard Library <https://docs.python.org/3/library/ipaddress.html>`_. `details.ip` will still return a string.
54+
``details.ip_address`` will return the an ``ipaddress`` object from the `Python Standard Library <https://docs.python.org/3/library/ipaddress.html>`_. ``details.ip`` will still return a string.
5555

5656
>>> details.ip
5757
104.175.221.247
@@ -65,7 +65,7 @@ IP Address
6565
Longitude and Latitude
6666
----------------------
6767

68-
`details.latitude` and `details.longitude` will return latitude and longitude, respectively, as strings. `details.loc` will still return a composite string of both values.
68+
``details.latitude`` and ``details.longitude`` will return latitude and longitude, respectively, as strings. ``details.loc`` will still return a composite string of both values.
6969

7070
>>> details.loc
7171
34.0293,-118.3570
@@ -77,7 +77,7 @@ Longitude and Latitude
7777
Accessing all properties
7878
------------------------
7979

80-
`details.all` will return all details data as a dictionary.
80+
``details.all`` will return all details data as a dictionary.
8181

8282
>>> details.all
8383
{
@@ -105,12 +105,12 @@ Accessing all properties
105105

106106
Caching
107107
=======
108-
In-memory caching of `details` data is provided by default via the `cachetools <https://cachetools.readthedocs.io/en/latest/>`_ library. This uses an LRU (least recently used) cache with a TTL (time to live) by default. This means that values will be cached for the specified duration; if the cache's max size is reached, cache values will be invalidated as necessary, starting with the oldest cached value.
108+
In-memory caching of ``details`` data is provided by default via the `cachetools <https://cachetools.readthedocs.io/en/latest/>`_ library. This uses an LRU (least recently used) cache with a TTL (time to live) by default. This means that values will be cached for the specified duration; if the cache's max size is reached, cache values will be invalidated as necessary, starting with the oldest cached value.
109109

110110
Modifying cache options
111111
-----------------------
112112

113-
Cache behavior can be modified by setting the `cache_options` keyword argument. `cache_options` is a dictionary in which the keys are keyword arguments specified in the `cachetools` library. The nesting of keyword arguments is to prevent name collisions between this library and its dependencies.
113+
Cache behavior can be modified by setting the ``cache_options`` keyword argument. ``cache_options`` is a dictionary in which the keys are keyword arguments specified in the ``cachetools`` library. The nesting of keyword arguments is to prevent name collisions between this library and its dependencies.
114114

115115
* Default maximum cache size: 4096 (multiples of 2 are recommended to increase efficiency)
116116
* Default TTL: 24 hours (in seconds)
@@ -120,16 +120,16 @@ Cache behavior can be modified by setting the `cache_options` keyword argument.
120120
Using a different cache
121121
-----------------------
122122

123-
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>`_.
123+
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>`_.
124124

125125
>>> handler = ipinfo_wrapper.getHandler(cache=my_fancy_custom_class)
126126

127127

128128
Internationalization
129129
====================
130-
When looking up an IP address, the response object includes a `details.country_name` attribute which includes the country name based on American English. It is possible to return the country name in other languages by setting the `countries_file` keyword argument when creating the `IPinfo` object.
130+
When looking up an IP address, the response object includes a ``details.country_name`` attribute which includes the country name based on American English. It is possible to return the country name in other languages by setting the ``countries_file`` keyword argument when creating the ``IPinfo`` object.
131131

132-
The file must be a `.json` file with the following structure::
132+
The file must be a ``.json`` file with the following structure::
133133

134134
{
135135
"BD": "Bangladesh",

0 commit comments

Comments
 (0)