mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
Adding docsting for download_json
This commit is contained in:
parent
c73cca3f40
commit
331e7e8539
1 changed files with 7 additions and 0 deletions
|
@ -48,7 +48,14 @@ def download_text(url, timeout=30):
|
||||||
|
|
||||||
|
|
||||||
def download_json(url, timeout=30):
|
def download_json(url, timeout=30):
|
||||||
|
"""
|
||||||
|
Download json from a url and returns the loaded json object
|
||||||
|
|
||||||
|
Keyword argument:
|
||||||
|
url -- The url to download the data from
|
||||||
|
timeout -- Number of seconds allowed for download to effectively start
|
||||||
|
before giving up
|
||||||
|
"""
|
||||||
# Fetch the data
|
# Fetch the data
|
||||||
text = download_text(url, timeout)
|
text = download_text(url, timeout)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue