File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -13,14 +13,21 @@ class Client:
1313 A client for the GeoUK API.
1414 """
1515
16- def __init__ (self , api_key , api_base_url = 'https://api.geouk.xyz' ):
16+ def __init__ (self ,
17+ api_key ,
18+ api_base_url = 'https://api.geouk.xyz' ,
19+ timeout = None
20+ ):
1721
1822 # A key used to authenticate API calls to an account
1923 self ._api_key = api_key
2024
2125 # The base URL to use when calling the API
2226 self ._api_base_url = api_base_url
2327
28+ # The period of time before requests to the API should timeout
29+ self ._timeout = timeout
30+
2431 # NOTE: Rate limiting information is only available after a request
2532 # has been made.
2633
@@ -79,7 +86,8 @@ def __call__(self,
7986 params = params ,
8087 data = data ,
8188 json = json_type_body ,
82- files = files
89+ files = files ,
90+ timeout = self ._timeout
8391 )
8492
8593 # Update the rate limit
Original file line number Diff line number Diff line change 2121 # Versions should comply with PEP440. For a discussion on single-sourcing
2222 # the version across setup.py and the project code, see
2323 # https://packaging.python.org/en/latest/single_source_version.html
24- version = '0.0.1 ' ,
24+ version = '0.0.2 ' ,
2525 description = (
2626 'The GeoUK Python library provides a pythonic interface to the GeoUK '
2727 'API.' ,
You can’t perform that action at this time.
0 commit comments