diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e69de29..6ef1711 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -0,0 +1,14 @@ +repos: + - repo: https://gitlab.com/pycqa/flake8 + rev: 3.7.7 + hooks: + - id: flake8 + - repo: https://github.com/asottile/seed-isort-config + rev: v1.9.3 + hooks: + - id: seed-isort-config + - repo: https://github.com/psf/black + rev: 20.8b1 + hooks: + - id: black + language_version: python3 diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..5570f55 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,19 @@ +sudo: true + +language: python + +dist: xenial + +python: + - "3.6" + - "3.7" + - "3.8" + +install: + - pip install poetry + - poetry install + +script: + - export PYTHONPATH=`pwd`; pytest tests/ + - black --check --verbose . + - flake8 cy_weather_api diff --git a/cy_weather_api/__init__.py b/cy_weather_api/__init__.py index a7e98f3..dc834fa 100644 --- a/cy_weather_api/__init__.py +++ b/cy_weather_api/__init__.py @@ -1,4 +1,4 @@ -from cyapi.client import CyAPIClient -from cyapi.models import initFromDict +from cy_weather_api.client import CyWeatherAPIClient +from cy_weather_api.models import initFromDict -__all__ = ["CyAPIClient", "initFromDict"] +__all__ = ["CyWeatherAPIClient", "initFromDict"] diff --git a/cy_weather_api/client.py b/cy_weather_api/client.py index a318465..1463be0 100644 --- a/cy_weather_api/client.py +++ b/cy_weather_api/client.py @@ -1,7 +1,8 @@ from dataclasses import dataclass import requests -from cyapi.models import initFromDict, CyWeatherAPIResponseHandler + +from cy_weather_api.models import CyWeatherAPIResponseHandler, initFromDict API_BASE = ( "http://api.caiyunapp.com/v2.5/{token}/{lng},{lat}/weather.json?" diff --git a/cy_weather_api/models/__init__.py b/cy_weather_api/models/__init__.py index 1985f78..7de3f1f 100644 --- a/cy_weather_api/models/__init__.py +++ b/cy_weather_api/models/__init__.py @@ -19,7 +19,7 @@ import orjson from dacite import from_dict -from cyapi.models.result import cyWeatherAPIResponseResultStruct +from cy_weather_api.models.result import cyWeatherAPIResponseResultStruct class EnhancedJSONEncoder(json.JSONEncoder): @@ -69,7 +69,6 @@ def initFromDict(data: Dict) -> CyWeatherAPIResponseHandler: if __name__ == "__main__": import requests - # from dacite import from_dict # NOTE: Test token, no one can ensure its availability. TOKEN = "TAkhjf8d1nlSlspN" diff --git a/cy_weather_api/models/daily.py b/cy_weather_api/models/daily.py index 000551c..ab363da 100644 --- a/cy_weather_api/models/daily.py +++ b/cy_weather_api/models/daily.py @@ -1,5 +1,5 @@ from dataclasses import dataclass -from typing import List, Any +from typing import Any, List, Union @dataclass @@ -24,8 +24,8 @@ class cyWeatherAPIResponseDailyMaxMinAvgItemStruct: @dataclass class cyWeatherAPIResponseDailyWindItemPropertyStruct: - speed: float - direction: float + speed: Union[float, int] + direction: Union[float, int] @dataclass diff --git a/cy_weather_api/models/hourly.py b/cy_weather_api/models/hourly.py index 5388548..1b6c9b5 100644 --- a/cy_weather_api/models/hourly.py +++ b/cy_weather_api/models/hourly.py @@ -1,12 +1,12 @@ from dataclasses import dataclass -from typing import Any, List +from typing import Any, List, Union @dataclass class cyWeatherAPIResponseHourlyWindStruct: datetime: str - speed: float - direction: float + speed: Union[float, int] + direction: Union[float, int] @dataclass diff --git a/cy_weather_api/models/realtime.py b/cy_weather_api/models/realtime.py index 801f84d..ae2c89e 100644 --- a/cy_weather_api/models/realtime.py +++ b/cy_weather_api/models/realtime.py @@ -1,10 +1,11 @@ from dataclasses import dataclass +from typing import Union @dataclass class cyWeatherAPIResponseRealtimeWindStruct: - speed: float - direction: float + speed: Union[float, int] + direction: Union[float, int] @dataclass diff --git a/cy_weather_api/models/result.py b/cy_weather_api/models/result.py index 724ef31..9c432f8 100644 --- a/cy_weather_api/models/result.py +++ b/cy_weather_api/models/result.py @@ -1,10 +1,10 @@ from dataclasses import dataclass -from cyapi.models.alert import cyWeatherAPIResponseAlertStruct -from cyapi.models.hourly import cyWeatherAPIResponseHourlyStruct -from cyapi.models.minutely import cyWeatherAPIResponseMinutelyStruct -from cyapi.models.realtime import cyWeatherAPIResponseRealtimeStruct -from cyapi.models.daily import cyWeatherAPIResponseDailyStruct +from cy_weather_api.models.alert import cyWeatherAPIResponseAlertStruct +from cy_weather_api.models.daily import cyWeatherAPIResponseDailyStruct +from cy_weather_api.models.hourly import cyWeatherAPIResponseHourlyStruct +from cy_weather_api.models.minutely import cyWeatherAPIResponseMinutelyStruct +from cy_weather_api.models.realtime import cyWeatherAPIResponseRealtimeStruct @dataclass diff --git a/poetry.lock b/poetry.lock index 6801ba5..596b1b7 100644 --- a/poetry.lock +++ b/poetry.lock @@ -6,6 +6,15 @@ optional = false python-versions = "*" version = "1.4.4" +[[package]] +category = "dev" +description = "Atomic file writes." +marker = "sys_platform == \"win32\"" +name = "atomicwrites" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +version = "1.4.0" + [[package]] category = "dev" description = "Classes Without Boilerplate" @@ -71,6 +80,15 @@ optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" version = "7.1.2" +[[package]] +category = "dev" +description = "Cross-platform colored terminal text." +marker = "sys_platform == \"win32\"" +name = "colorama" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +version = "0.4.3" + [[package]] category = "main" description = "Simple creation of data classes from dictionaries." @@ -181,6 +199,14 @@ version = ">=0.4" [package.extras] docs = ["sphinx", "rst.linker", "jaraco.packaging"] +[[package]] +category = "dev" +description = "iniconfig: brain-dead simple config-ini parsing" +name = "iniconfig" +optional = false +python-versions = "*" +version = "1.0.1" + [[package]] category = "dev" description = "McCabe checker, plugin for flake8" @@ -189,6 +215,14 @@ optional = false python-versions = "*" version = "0.6.1" +[[package]] +category = "dev" +description = "More routines for operating on iterables, beyond itertools" +name = "more-itertools" +optional = false +python-versions = ">=3.5" +version = "8.5.0" + [[package]] category = "dev" description = "Node.js virtual environment builder" @@ -205,6 +239,18 @@ optional = false python-versions = ">=3.6" version = "3.3.1" +[[package]] +category = "dev" +description = "Core utilities for Python packages" +name = "packaging" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +version = "20.4" + +[package.dependencies] +pyparsing = ">=2.0.2" +six = "*" + [[package]] category = "dev" description = "Utility library for gitignore style pattern matching of file paths." @@ -213,6 +259,22 @@ optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" version = "0.8.0" +[[package]] +category = "dev" +description = "plugin and hook calling mechanisms for python" +name = "pluggy" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +version = "0.13.1" + +[package.dependencies] +[package.dependencies.importlib-metadata] +python = "<3.8" +version = ">=0.12" + +[package.extras] +dev = ["pre-commit", "tox"] + [[package]] category = "dev" description = "A framework for managing and maintaining multi-language pre-commit hooks." @@ -237,6 +299,14 @@ version = "*" python = "<3.7" version = "*" +[[package]] +category = "dev" +description = "library with cross-python path, ini-parsing, io, code, log facilities" +name = "py" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +version = "1.9.0" + [[package]] category = "dev" description = "Python style guide checker" @@ -253,6 +323,41 @@ optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" version = "2.2.0" +[[package]] +category = "dev" +description = "Python parsing module" +name = "pyparsing" +optional = false +python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" +version = "2.4.7" + +[[package]] +category = "dev" +description = "pytest: simple powerful testing with Python" +name = "pytest" +optional = false +python-versions = ">=3.5" +version = "6.0.1" + +[package.dependencies] +atomicwrites = ">=1.0" +attrs = ">=17.4.0" +colorama = "*" +iniconfig = "*" +more-itertools = ">=4.0.0" +packaging = "*" +pluggy = ">=0.12,<1.0" +py = ">=1.8.2" +toml = "*" + +[package.dependencies.importlib-metadata] +python = "<3.8" +version = ">=0.12" + +[package.extras] +checkqa_mypy = ["mypy (0.780)"] +testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"] + [[package]] category = "dev" description = "YAML parser and emitter for Python" @@ -364,7 +469,8 @@ docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] testing = ["jaraco.itertools", "func-timeout"] [metadata] -content-hash = "449fd15953f2e8eab1256f64f1f7bb7308f165abd0cbb8f1f4434bee9e79e06b" +content-hash = "827e117b22c8bf0f9a22e9eedd06f093943ad032186e0c5cebeae4008c9108b7" +lock-version = "1.0" python-versions = "^3.6.1" [metadata.files] @@ -372,6 +478,10 @@ appdirs = [ {file = "appdirs-1.4.4-py2.py3-none-any.whl", hash = "sha256:a841dacd6b99318a741b166adb07e19ee71a274450e68237b4650ca1055ab128"}, {file = "appdirs-1.4.4.tar.gz", hash = "sha256:7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41"}, ] +atomicwrites = [ + {file = "atomicwrites-1.4.0-py2.py3-none-any.whl", hash = "sha256:6d1784dea7c0c8d4a5172b6c620f40b6e4cbfdf96d783691f2e1302a7b88e197"}, + {file = "atomicwrites-1.4.0.tar.gz", hash = "sha256:ae70396ad1a434f9c7046fd2dd196fc04b12f9e91ffb859164193be8b6168a7a"}, +] attrs = [ {file = "attrs-20.1.0-py2.py3-none-any.whl", hash = "sha256:2867b7b9f8326499ab5b0e2d12801fa5c98842d2cbd22b35112ae04bf85b4dff"}, {file = "attrs-20.1.0.tar.gz", hash = "sha256:0ef97238856430dcf9228e07f316aefc17e8939fc8507e18c6501b761ef1a42a"}, @@ -396,6 +506,10 @@ click = [ {file = "click-7.1.2-py2.py3-none-any.whl", hash = "sha256:dacca89f4bfadd5de3d7489b7c8a566eee0d3676333fbb50030263894c38c0dc"}, {file = "click-7.1.2.tar.gz", hash = "sha256:d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a"}, ] +colorama = [ + {file = "colorama-0.4.3-py2.py3-none-any.whl", hash = "sha256:7d73d2a99753107a36ac6b455ee49046802e59d9d076ef8e47b61499fa29afff"}, + {file = "colorama-0.4.3.tar.gz", hash = "sha256:e96da0d330793e2cb9485e9ddfd918d456036c7149416295932478192f4436a1"}, +] dacite = [ {file = "dacite-1.5.1-py3-none-any.whl", hash = "sha256:f7f269647ede90f8702728eb7dcb972051511c81b853a93c962fbd31f1753b9f"}, {file = "dacite-1.5.1.tar.gz", hash = "sha256:764c96e0304cb189628686689a163a6a3a8ce7bf3465f0a2d882a8b42f88108f"}, @@ -432,10 +546,18 @@ importlib-resources = [ {file = "importlib_resources-3.0.0-py2.py3-none-any.whl", hash = "sha256:d028f66b66c0d5732dae86ba4276999855e162a749c92620a38c1d779ed138a7"}, {file = "importlib_resources-3.0.0.tar.gz", hash = "sha256:19f745a6eca188b490b1428c8d1d4a0d2368759f32370ea8fb89cad2ab1106c3"}, ] +iniconfig = [ + {file = "iniconfig-1.0.1-py3-none-any.whl", hash = "sha256:80cf40c597eb564e86346103f609d74efce0f6b4d4f30ec8ce9e2c26411ba437"}, + {file = "iniconfig-1.0.1.tar.gz", hash = "sha256:e5f92f89355a67de0595932a6c6c02ab4afddc6fcdc0bfc5becd0d60884d3f69"}, +] mccabe = [ {file = "mccabe-0.6.1-py2.py3-none-any.whl", hash = "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42"}, {file = "mccabe-0.6.1.tar.gz", hash = "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"}, ] +more-itertools = [ + {file = "more-itertools-8.5.0.tar.gz", hash = "sha256:6f83822ae94818eae2612063a5101a7311e68ae8002005b5e05f03fd74a86a20"}, + {file = "more_itertools-8.5.0-py3-none-any.whl", hash = "sha256:9b30f12df9393f0d28af9210ff8efe48d10c94f73e5daf886f10c4b0b0b4f03c"}, +] nodeenv = [ {file = "nodeenv-1.5.0-py2.py3-none-any.whl", hash = "sha256:5304d424c529c997bc888453aeaa6362d242b6b4631e90f3d4bf1b290f1c84a9"}, {file = "nodeenv-1.5.0.tar.gz", hash = "sha256:ab45090ae383b716c4ef89e690c41ff8c2b257b85b309f01f3654df3d084bd7c"}, @@ -460,14 +582,26 @@ orjson = [ {file = "orjson-3.3.1-cp39-cp39-manylinux2014_x86_64.whl", hash = "sha256:a7d634eb69083ca5a49baf412625604813f9e3365cb869f445c388d15fe60122"}, {file = "orjson-3.3.1.tar.gz", hash = "sha256:149d6a2bc71514826979b9d053f3df0c2397a99e2b87213ba71605a1626d662c"}, ] +packaging = [ + {file = "packaging-20.4-py2.py3-none-any.whl", hash = "sha256:998416ba6962ae7fbd6596850b80e17859a5753ba17c32284f67bfff33784181"}, + {file = "packaging-20.4.tar.gz", hash = "sha256:4357f74f47b9c12db93624a82154e9b120fa8293699949152b22065d556079f8"}, +] pathspec = [ {file = "pathspec-0.8.0-py2.py3-none-any.whl", hash = "sha256:7d91249d21749788d07a2d0f94147accd8f845507400749ea19c1ec9054a12b0"}, {file = "pathspec-0.8.0.tar.gz", hash = "sha256:da45173eb3a6f2a5a487efba21f050af2b41948be6ab52b6a1e3ff22bb8b7061"}, ] +pluggy = [ + {file = "pluggy-0.13.1-py2.py3-none-any.whl", hash = "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d"}, + {file = "pluggy-0.13.1.tar.gz", hash = "sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0"}, +] pre-commit = [ {file = "pre_commit-2.7.1-py2.py3-none-any.whl", hash = "sha256:810aef2a2ba4f31eed1941fc270e72696a1ad5590b9751839c90807d0fff6b9a"}, {file = "pre_commit-2.7.1.tar.gz", hash = "sha256:c54fd3e574565fe128ecc5e7d2f91279772ddb03f8729645fa812fe809084a70"}, ] +py = [ + {file = "py-1.9.0-py2.py3-none-any.whl", hash = "sha256:366389d1db726cd2fcfc79732e75410e5fe4d31db13692115529d34069a043c2"}, + {file = "py-1.9.0.tar.gz", hash = "sha256:9ca6883ce56b4e8da7e79ac18787889fa5206c79dcc67fb065376cd2fe03f342"}, +] pycodestyle = [ {file = "pycodestyle-2.6.0-py2.py3-none-any.whl", hash = "sha256:2295e7b2f6b5bd100585ebcb1f616591b652db8a741695b3d8f5d28bdc934367"}, {file = "pycodestyle-2.6.0.tar.gz", hash = "sha256:c58a7d2815e0e8d7972bf1803331fb0152f867bd89adf8a01dfd55085434192e"}, @@ -476,6 +610,14 @@ pyflakes = [ {file = "pyflakes-2.2.0-py2.py3-none-any.whl", hash = "sha256:0d94e0e05a19e57a99444b6ddcf9a6eb2e5c68d3ca1e98e90707af8152c90a92"}, {file = "pyflakes-2.2.0.tar.gz", hash = "sha256:35b2d75ee967ea93b55750aa9edbbf72813e06a66ba54438df2cfac9e3c27fc8"}, ] +pyparsing = [ + {file = "pyparsing-2.4.7-py2.py3-none-any.whl", hash = "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"}, + {file = "pyparsing-2.4.7.tar.gz", hash = "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1"}, +] +pytest = [ + {file = "pytest-6.0.1-py3-none-any.whl", hash = "sha256:8b6007800c53fdacd5a5c192203f4e531eb2a1540ad9c752e052ec0f7143dbad"}, + {file = "pytest-6.0.1.tar.gz", hash = "sha256:85228d75db9f45e06e57ef9bf4429267f81ac7c0d742cc9ed63d09886a9fe6f4"}, +] pyyaml = [ {file = "PyYAML-5.3.1-cp27-cp27m-win32.whl", hash = "sha256:74809a57b329d6cc0fdccee6318f44b9b8649961fa73144a98735b0aaf029f1f"}, {file = "PyYAML-5.3.1-cp27-cp27m-win_amd64.whl", hash = "sha256:240097ff019d7c70a4922b6869d8a86407758333f02203e0fc6ff79c5dcede76"}, diff --git a/pyproject.toml b/pyproject.toml index b8ad282..ecaf5d0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "cy-weather-api" -version = "0.1.3" +version = "0.1.4" description = "Caiyun Weather API Python SDK" authors = ["Caiyunapp "] readme = "README.md" @@ -16,6 +16,7 @@ dacite = "^1.5.0" pre-commit = "^2.3.0" black = "^19.10b0" flake8 = "isort" +pytest = "^6.0.1" [build-system] requires = ["poetry>=0.12"] diff --git a/tests/data/sample1.json b/tests/data/sample1.json new file mode 100644 index 0000000..fa0f677 --- /dev/null +++ b/tests/data/sample1.json @@ -0,0 +1 @@ +{"status":"ok","api_version":"v2.5","api_status":"active","lang":"zh_CN","unit":"metric","tzshift":28800,"timezone":"Asia\/Shanghai","server_time":1599635487,"location":[39.2072,101.6656],"result":{"realtime":{"status":"ok","temperature":22.0,"humidity":0.45,"cloudrate":0.0,"skycon":"CLEAR_DAY","visibility":30.0,"dswrf":761.8,"wind":{"speed":6.48,"direction":121.0},"pressure":84573.75,"apparent_temperature":21.4,"precipitation":{"local":{"status":"ok","datasource":"gfs","intensity":0.0}},"air_quality":{"pm25":3,"pm10":0,"o3":0,"so2":0,"no2":0,"co":0,"aqi":{"chn":7,"usa":0},"description":{"usa":"","chn":"\u4f18"}},"life_index":{"ultraviolet":{"index":8.0,"desc":"\u5f3a"},"comfort":{"index":5,"desc":"\u8212\u9002"}}},"minutely":{"status":"ok","datasource":"gfs","precipitation_2h":[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],"precipitation":[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],"probability":[0.0,0.0,0.0,0.0],"description":"\u96f7\u8fbe\u6570\u636e\u8fd8\u5728\u6536\u96c6\u4e2d\u2026\u2026\u4f46\u5c0f\u5f69\u4e91\u89c9\u5f97\u4e0d\u4f1a\u4e0b\u96e8\u5462"},"hourly":{"status":"ok","description":"\u672a\u676524\u5c0f\u65f6\u6674","precipitation":[{"datetime":"2020-09-09T15:00+08:00","value":0.0},{"datetime":"2020-09-09T16:00+08:00","value":0.0},{"datetime":"2020-09-09T17:00+08:00","value":0.0},{"datetime":"2020-09-09T18:00+08:00","value":0.0},{"datetime":"2020-09-09T19:00+08:00","value":0.0},{"datetime":"2020-09-09T20:00+08:00","value":0.0},{"datetime":"2020-09-09T21:00+08:00","value":0.0},{"datetime":"2020-09-09T22:00+08:00","value":0.0},{"datetime":"2020-09-09T23:00+08:00","value":0.0},{"datetime":"2020-09-10T00:00+08:00","value":0.0},{"datetime":"2020-09-10T01:00+08:00","value":0.0},{"datetime":"2020-09-10T02:00+08:00","value":0.0},{"datetime":"2020-09-10T03:00+08:00","value":0.0},{"datetime":"2020-09-10T04:00+08:00","value":0.0},{"datetime":"2020-09-10T05:00+08:00","value":0.0},{"datetime":"2020-09-10T06:00+08:00","value":0.0},{"datetime":"2020-09-10T07:00+08:00","value":0.0},{"datetime":"2020-09-10T08:00+08:00","value":0.0},{"datetime":"2020-09-10T09:00+08:00","value":0.0},{"datetime":"2020-09-10T10:00+08:00","value":0.0},{"datetime":"2020-09-10T11:00+08:00","value":0.0},{"datetime":"2020-09-10T12:00+08:00","value":0.0},{"datetime":"2020-09-10T13:00+08:00","value":0.0},{"datetime":"2020-09-10T14:00+08:00","value":0.0},{"datetime":"2020-09-10T15:00+08:00","value":0.0},{"datetime":"2020-09-10T16:00+08:00","value":0.0},{"datetime":"2020-09-10T17:00+08:00","value":0.0},{"datetime":"2020-09-10T18:00+08:00","value":0.0},{"datetime":"2020-09-10T19:00+08:00","value":0.0},{"datetime":"2020-09-10T20:00+08:00","value":0.0},{"datetime":"2020-09-10T21:00+08:00","value":0.0},{"datetime":"2020-09-10T22:00+08:00","value":0.0},{"datetime":"2020-09-10T23:00+08:00","value":0.0},{"datetime":"2020-09-11T00:00+08:00","value":0.0},{"datetime":"2020-09-11T01:00+08:00","value":0.0},{"datetime":"2020-09-11T02:00+08:00","value":0.0},{"datetime":"2020-09-11T03:00+08:00","value":0.0},{"datetime":"2020-09-11T04:00+08:00","value":0.0},{"datetime":"2020-09-11T05:00+08:00","value":0.0},{"datetime":"2020-09-11T06:00+08:00","value":0.0},{"datetime":"2020-09-11T07:00+08:00","value":0.0},{"datetime":"2020-09-11T08:00+08:00","value":0.0},{"datetime":"2020-09-11T09:00+08:00","value":0.0},{"datetime":"2020-09-11T10:00+08:00","value":0.0},{"datetime":"2020-09-11T11:00+08:00","value":0.0},{"datetime":"2020-09-11T12:00+08:00","value":0.0},{"datetime":"2020-09-11T13:00+08:00","value":0.0},{"datetime":"2020-09-11T14:00+08:00","value":0.0}],"temperature":[{"datetime":"2020-09-09T15:00+08:00","value":22.0},{"datetime":"2020-09-09T16:00+08:00","value":22.33},{"datetime":"2020-09-09T17:00+08:00","value":22.67},{"datetime":"2020-09-09T18:00+08:00","value":22.0},{"datetime":"2020-09-09T19:00+08:00","value":21.33},{"datetime":"2020-09-09T20:00+08:00","value":20.67},{"datetime":"2020-09-09T21:00+08:00","value":21.0},{"datetime":"2020-09-09T22:00+08:00","value":20.0},{"datetime":"2020-09-09T23:00+08:00","value":19.6},{"datetime":"2020-09-10T00:00+08:00","value":18.4},{"datetime":"2020-09-10T01:00+08:00","value":18.1},{"datetime":"2020-09-10T02:00+08:00","value":17.2},{"datetime":"2020-09-10T03:00+08:00","value":16.5},{"datetime":"2020-09-10T04:00+08:00","value":16.4},{"datetime":"2020-09-10T05:00+08:00","value":17.2},{"datetime":"2020-09-10T06:00+08:00","value":18.0},{"datetime":"2020-09-10T07:00+08:00","value":19.0},{"datetime":"2020-09-10T08:00+08:00","value":16.0},{"datetime":"2020-09-10T09:00+08:00","value":20.2},{"datetime":"2020-09-10T10:00+08:00","value":20.4},{"datetime":"2020-09-10T11:00+08:00","value":20.6},{"datetime":"2020-09-10T12:00+08:00","value":21.2},{"datetime":"2020-09-10T13:00+08:00","value":21.8},{"datetime":"2020-09-10T14:00+08:00","value":26.0},{"datetime":"2020-09-10T15:00+08:00","value":23.31},{"datetime":"2020-09-10T16:00+08:00","value":24.0},{"datetime":"2020-09-10T17:00+08:00","value":24.69},{"datetime":"2020-09-10T18:00+08:00","value":25.21},{"datetime":"2020-09-10T19:00+08:00","value":24.63},{"datetime":"2020-09-10T20:00+08:00","value":23.95},{"datetime":"2020-09-10T21:00+08:00","value":23.36},{"datetime":"2020-09-10T22:00+08:00","value":21.99},{"datetime":"2020-09-10T23:00+08:00","value":20.73},{"datetime":"2020-09-11T00:00+08:00","value":19.32},{"datetime":"2020-09-11T01:00+08:00","value":18.65},{"datetime":"2020-09-11T02:00+08:00","value":18.0},{"datetime":"2020-09-11T03:00+08:00","value":17.4},{"datetime":"2020-09-11T04:00+08:00","value":16.9},{"datetime":"2020-09-11T05:00+08:00","value":16.53},{"datetime":"2020-09-11T06:00+08:00","value":16.21},{"datetime":"2020-09-11T07:00+08:00","value":16.0},{"datetime":"2020-09-11T08:00+08:00","value":17.1},{"datetime":"2020-09-11T09:00+08:00","value":18.2},{"datetime":"2020-09-11T10:00+08:00","value":19.3},{"datetime":"2020-09-11T11:00+08:00","value":20.4},{"datetime":"2020-09-11T12:00+08:00","value":21.5},{"datetime":"2020-09-11T13:00+08:00","value":22.6},{"datetime":"2020-09-11T14:00+08:00","value":23.7}],"wind":[{"datetime":"2020-09-09T15:00+08:00","speed":6.48,"direction":121.0},{"datetime":"2020-09-09T16:00+08:00","speed":3.45,"direction":126.48},{"datetime":"2020-09-09T17:00+08:00","speed":5.82,"direction":122.71},{"datetime":"2020-09-09T18:00+08:00","speed":11.41,"direction":114.05},{"datetime":"2020-09-09T19:00+08:00","speed":19.56,"direction":113.22},{"datetime":"2020-09-09T20:00+08:00","speed":24.93,"direction":118.11},{"datetime":"2020-09-09T21:00+08:00","speed":28.19,"direction":129.4},{"datetime":"2020-09-09T22:00+08:00","speed":29.82,"direction":139.85},{"datetime":"2020-09-09T23:00+08:00","speed":29.11,"direction":140.71},{"datetime":"2020-09-10T00:00+08:00","speed":28.17,"direction":134.72},{"datetime":"2020-09-10T01:00+08:00","speed":27.29,"direction":130.0},{"datetime":"2020-09-10T02:00+08:00","speed":26.73,"direction":127.07},{"datetime":"2020-09-10T03:00+08:00","speed":23.84,"direction":128.23},{"datetime":"2020-09-10T04:00+08:00","speed":21.57,"direction":127.03},{"datetime":"2020-09-10T05:00+08:00","speed":21.71,"direction":126.56},{"datetime":"2020-09-10T06:00+08:00","speed":21.37,"direction":127.8},{"datetime":"2020-09-10T07:00+08:00","speed":21.24,"direction":125.26},{"datetime":"2020-09-10T08:00+08:00","speed":24.73,"direction":125.73},{"datetime":"2020-09-10T09:00+08:00","speed":27.55,"direction":131.59},{"datetime":"2020-09-10T10:00+08:00","speed":29.85,"direction":126.23},{"datetime":"2020-09-10T11:00+08:00","speed":31.45,"direction":121.96},{"datetime":"2020-09-10T12:00+08:00","speed":31.74,"direction":122.41},{"datetime":"2020-09-10T13:00+08:00","speed":31.04,"direction":121.65},{"datetime":"2020-09-10T14:00+08:00","speed":30.17,"direction":115.45},{"datetime":"2020-09-10T15:00+08:00","speed":29.98,"direction":113.15},{"datetime":"2020-09-10T16:00+08:00","speed":29.31,"direction":119.27},{"datetime":"2020-09-10T17:00+08:00","speed":30.76,"direction":116.58},{"datetime":"2020-09-10T18:00+08:00","speed":30.25,"direction":119.15},{"datetime":"2020-09-10T19:00+08:00","speed":30.34,"direction":118.45},{"datetime":"2020-09-10T20:00+08:00","speed":28.73,"direction":120.69},{"datetime":"2020-09-10T21:00+08:00","speed":28.24,"direction":121.18},{"datetime":"2020-09-10T22:00+08:00","speed":28.39,"direction":123.17},{"datetime":"2020-09-10T23:00+08:00","speed":30.96,"direction":127.17},{"datetime":"2020-09-11T00:00+08:00","speed":34.44,"direction":132.33},{"datetime":"2020-09-11T01:00+08:00","speed":33.1,"direction":133.5},{"datetime":"2020-09-11T02:00+08:00","speed":33.39,"direction":132.36},{"datetime":"2020-09-11T03:00+08:00","speed":31.34,"direction":129.45},{"datetime":"2020-09-11T04:00+08:00","speed":31.17,"direction":128.33},{"datetime":"2020-09-11T05:00+08:00","speed":27.98,"direction":126.49},{"datetime":"2020-09-11T06:00+08:00","speed":23.68,"direction":131.53},{"datetime":"2020-09-11T07:00+08:00","speed":20.89,"direction":130.24},{"datetime":"2020-09-11T08:00+08:00","speed":20.03,"direction":136.74},{"datetime":"2020-09-11T09:00+08:00","speed":20.66,"direction":136.78},{"datetime":"2020-09-11T10:00+08:00","speed":20.66,"direction":129.01},{"datetime":"2020-09-11T11:00+08:00","speed":19.25,"direction":129.47},{"datetime":"2020-09-11T12:00+08:00","speed":17.91,"direction":127.14},{"datetime":"2020-09-11T13:00+08:00","speed":13.95,"direction":137.52},{"datetime":"2020-09-11T14:00+08:00","speed":9.72,"direction":131.2}],"humidity":[{"datetime":"2020-09-09T15:00+08:00","value":0.45},{"datetime":"2020-09-09T16:00+08:00","value":0.35},{"datetime":"2020-09-09T17:00+08:00","value":0.34},{"datetime":"2020-09-09T18:00+08:00","value":0.35},{"datetime":"2020-09-09T19:00+08:00","value":0.38},{"datetime":"2020-09-09T20:00+08:00","value":0.42},{"datetime":"2020-09-09T21:00+08:00","value":0.46},{"datetime":"2020-09-09T22:00+08:00","value":0.5},{"datetime":"2020-09-09T23:00+08:00","value":0.52},{"datetime":"2020-09-10T00:00+08:00","value":0.55},{"datetime":"2020-09-10T01:00+08:00","value":0.57},{"datetime":"2020-09-10T02:00+08:00","value":0.6},{"datetime":"2020-09-10T03:00+08:00","value":0.61},{"datetime":"2020-09-10T04:00+08:00","value":0.62},{"datetime":"2020-09-10T05:00+08:00","value":0.64},{"datetime":"2020-09-10T06:00+08:00","value":0.64},{"datetime":"2020-09-10T07:00+08:00","value":0.66},{"datetime":"2020-09-10T08:00+08:00","value":0.63},{"datetime":"2020-09-10T09:00+08:00","value":0.57},{"datetime":"2020-09-10T10:00+08:00","value":0.52},{"datetime":"2020-09-10T11:00+08:00","value":0.46},{"datetime":"2020-09-10T12:00+08:00","value":0.4},{"datetime":"2020-09-10T13:00+08:00","value":0.35},{"datetime":"2020-09-10T14:00+08:00","value":0.31},{"datetime":"2020-09-10T15:00+08:00","value":0.28},{"datetime":"2020-09-10T16:00+08:00","value":0.28},{"datetime":"2020-09-10T17:00+08:00","value":0.28},{"datetime":"2020-09-10T18:00+08:00","value":0.29},{"datetime":"2020-09-10T19:00+08:00","value":0.31},{"datetime":"2020-09-10T20:00+08:00","value":0.34},{"datetime":"2020-09-10T21:00+08:00","value":0.36},{"datetime":"2020-09-10T22:00+08:00","value":0.38},{"datetime":"2020-09-10T23:00+08:00","value":0.39},{"datetime":"2020-09-11T00:00+08:00","value":0.42},{"datetime":"2020-09-11T01:00+08:00","value":0.47},{"datetime":"2020-09-11T02:00+08:00","value":0.49},{"datetime":"2020-09-11T03:00+08:00","value":0.5},{"datetime":"2020-09-11T04:00+08:00","value":0.5},{"datetime":"2020-09-11T05:00+08:00","value":0.51},{"datetime":"2020-09-11T06:00+08:00","value":0.52},{"datetime":"2020-09-11T07:00+08:00","value":0.54},{"datetime":"2020-09-11T08:00+08:00","value":0.53},{"datetime":"2020-09-11T09:00+08:00","value":0.5},{"datetime":"2020-09-11T10:00+08:00","value":0.45},{"datetime":"2020-09-11T11:00+08:00","value":0.4},{"datetime":"2020-09-11T12:00+08:00","value":0.36},{"datetime":"2020-09-11T13:00+08:00","value":0.32},{"datetime":"2020-09-11T14:00+08:00","value":0.29}],"cloudrate":[{"datetime":"2020-09-09T15:00+08:00","value":0.0},{"datetime":"2020-09-09T16:00+08:00","value":0.0},{"datetime":"2020-09-09T17:00+08:00","value":0.2},{"datetime":"2020-09-09T18:00+08:00","value":0.17},{"datetime":"2020-09-09T19:00+08:00","value":0.18},{"datetime":"2020-09-09T20:00+08:00","value":0.16},{"datetime":"2020-09-09T21:00+08:00","value":0.05},{"datetime":"2020-09-09T22:00+08:00","value":0.02},{"datetime":"2020-09-09T23:00+08:00","value":0.02},{"datetime":"2020-09-10T00:00+08:00","value":0.01},{"datetime":"2020-09-10T01:00+08:00","value":0.01},{"datetime":"2020-09-10T02:00+08:00","value":0.01},{"datetime":"2020-09-10T03:00+08:00","value":0.0},{"datetime":"2020-09-10T04:00+08:00","value":0.0},{"datetime":"2020-09-10T05:00+08:00","value":0.0},{"datetime":"2020-09-10T06:00+08:00","value":0.0},{"datetime":"2020-09-10T07:00+08:00","value":0.0},{"datetime":"2020-09-10T08:00+08:00","value":0.0},{"datetime":"2020-09-10T09:00+08:00","value":0.0},{"datetime":"2020-09-10T10:00+08:00","value":0.0},{"datetime":"2020-09-10T11:00+08:00","value":0.0},{"datetime":"2020-09-10T12:00+08:00","value":0.0},{"datetime":"2020-09-10T13:00+08:00","value":0.02},{"datetime":"2020-09-10T14:00+08:00","value":0.19},{"datetime":"2020-09-10T15:00+08:00","value":1.0},{"datetime":"2020-09-10T16:00+08:00","value":1.0},{"datetime":"2020-09-10T17:00+08:00","value":1.0},{"datetime":"2020-09-10T18:00+08:00","value":1.0},{"datetime":"2020-09-10T19:00+08:00","value":1.0},{"datetime":"2020-09-10T20:00+08:00","value":1.0},{"datetime":"2020-09-10T21:00+08:00","value":1.0},{"datetime":"2020-09-10T22:00+08:00","value":1.0},{"datetime":"2020-09-10T23:00+08:00","value":1.0},{"datetime":"2020-09-11T00:00+08:00","value":1.0},{"datetime":"2020-09-11T01:00+08:00","value":1.0},{"datetime":"2020-09-11T02:00+08:00","value":1.0},{"datetime":"2020-09-11T03:00+08:00","value":1.0},{"datetime":"2020-09-11T04:00+08:00","value":0.99},{"datetime":"2020-09-11T05:00+08:00","value":0.67},{"datetime":"2020-09-11T06:00+08:00","value":0.51},{"datetime":"2020-09-11T07:00+08:00","value":0.41},{"datetime":"2020-09-11T08:00+08:00","value":0.34},{"datetime":"2020-09-11T09:00+08:00","value":0.0},{"datetime":"2020-09-11T10:00+08:00","value":0.02},{"datetime":"2020-09-11T11:00+08:00","value":0.08},{"datetime":"2020-09-11T12:00+08:00","value":0.07},{"datetime":"2020-09-11T13:00+08:00","value":0.08},{"datetime":"2020-09-11T14:00+08:00","value":0.13}],"skycon":[{"datetime":"2020-09-09T15:00+08:00","value":"CLEAR_DAY"},{"datetime":"2020-09-09T16:00+08:00","value":"CLEAR_DAY"},{"datetime":"2020-09-09T17:00+08:00","value":"CLEAR_DAY"},{"datetime":"2020-09-09T18:00+08:00","value":"CLEAR_DAY"},{"datetime":"2020-09-09T19:00+08:00","value":"CLEAR_DAY"},{"datetime":"2020-09-09T20:00+08:00","value":"CLEAR_NIGHT"},{"datetime":"2020-09-09T21:00+08:00","value":"CLEAR_NIGHT"},{"datetime":"2020-09-09T22:00+08:00","value":"CLEAR_NIGHT"},{"datetime":"2020-09-09T23:00+08:00","value":"CLEAR_NIGHT"},{"datetime":"2020-09-10T00:00+08:00","value":"CLEAR_NIGHT"},{"datetime":"2020-09-10T01:00+08:00","value":"CLEAR_NIGHT"},{"datetime":"2020-09-10T02:00+08:00","value":"CLEAR_NIGHT"},{"datetime":"2020-09-10T03:00+08:00","value":"CLEAR_NIGHT"},{"datetime":"2020-09-10T04:00+08:00","value":"CLEAR_NIGHT"},{"datetime":"2020-09-10T05:00+08:00","value":"CLEAR_NIGHT"},{"datetime":"2020-09-10T06:00+08:00","value":"CLEAR_NIGHT"},{"datetime":"2020-09-10T07:00+08:00","value":"CLEAR_DAY"},{"datetime":"2020-09-10T08:00+08:00","value":"CLEAR_DAY"},{"datetime":"2020-09-10T09:00+08:00","value":"CLEAR_DAY"},{"datetime":"2020-09-10T10:00+08:00","value":"CLEAR_DAY"},{"datetime":"2020-09-10T11:00+08:00","value":"CLEAR_DAY"},{"datetime":"2020-09-10T12:00+08:00","value":"CLEAR_DAY"},{"datetime":"2020-09-10T13:00+08:00","value":"CLEAR_DAY"},{"datetime":"2020-09-10T14:00+08:00","value":"CLEAR_DAY"},{"datetime":"2020-09-10T15:00+08:00","value":"CLOUDY"},{"datetime":"2020-09-10T16:00+08:00","value":"CLOUDY"},{"datetime":"2020-09-10T17:00+08:00","value":"CLOUDY"},{"datetime":"2020-09-10T18:00+08:00","value":"CLOUDY"},{"datetime":"2020-09-10T19:00+08:00","value":"CLOUDY"},{"datetime":"2020-09-10T20:00+08:00","value":"CLOUDY"},{"datetime":"2020-09-10T21:00+08:00","value":"CLOUDY"},{"datetime":"2020-09-10T22:00+08:00","value":"CLOUDY"},{"datetime":"2020-09-10T23:00+08:00","value":"CLOUDY"},{"datetime":"2020-09-11T00:00+08:00","value":"WIND"},{"datetime":"2020-09-11T01:00+08:00","value":"WIND"},{"datetime":"2020-09-11T02:00+08:00","value":"WIND"},{"datetime":"2020-09-11T03:00+08:00","value":"CLOUDY"},{"datetime":"2020-09-11T04:00+08:00","value":"CLOUDY"},{"datetime":"2020-09-11T05:00+08:00","value":"PARTLY_CLOUDY_NIGHT"},{"datetime":"2020-09-11T06:00+08:00","value":"PARTLY_CLOUDY_NIGHT"},{"datetime":"2020-09-11T07:00+08:00","value":"PARTLY_CLOUDY_DAY"},{"datetime":"2020-09-11T08:00+08:00","value":"PARTLY_CLOUDY_DAY"},{"datetime":"2020-09-11T09:00+08:00","value":"CLEAR_DAY"},{"datetime":"2020-09-11T10:00+08:00","value":"CLEAR_DAY"},{"datetime":"2020-09-11T11:00+08:00","value":"CLEAR_DAY"},{"datetime":"2020-09-11T12:00+08:00","value":"CLEAR_DAY"},{"datetime":"2020-09-11T13:00+08:00","value":"CLEAR_DAY"},{"datetime":"2020-09-11T14:00+08:00","value":"CLEAR_DAY"}],"pressure":[{"datetime":"2020-09-09T15:00+08:00","value":84573.7477342566},{"datetime":"2020-09-09T16:00+08:00","value":84493.7477342566},{"datetime":"2020-09-09T17:00+08:00","value":84493.7477342567},{"datetime":"2020-09-09T18:00+08:00","value":84420.9722224973},{"datetime":"2020-09-09T19:00+08:00","value":84420.9722224973},{"datetime":"2020-09-09T20:00+08:00","value":84420.9722224973},{"datetime":"2020-09-09T21:00+08:00","value":84500.9722224973},{"datetime":"2020-09-09T22:00+08:00","value":84603.9627907379},{"datetime":"2020-09-09T23:00+08:00","value":84603.9627907379},{"datetime":"2020-09-10T00:00+08:00","value":84570.1517424973},{"datetime":"2020-09-10T01:00+08:00","value":84493.7477342566},{"datetime":"2020-09-10T02:00+08:00","value":84490.1517424973},{"datetime":"2020-09-10T03:00+08:00","value":84443.9627907379},{"datetime":"2020-09-10T04:00+08:00","value":84490.1517424973},{"datetime":"2020-09-10T05:00+08:00","value":84443.9627907379},{"datetime":"2020-09-10T06:00+08:00","value":84410.1517424973},{"datetime":"2020-09-10T07:00+08:00","value":84410.1517424973},{"datetime":"2020-09-10T08:00+08:00","value":84413.7477342566},{"datetime":"2020-09-10T09:00+08:00","value":84413.7477342567},{"datetime":"2020-09-10T10:00+08:00","value":84443.9627907379},{"datetime":"2020-09-10T11:00+08:00","value":84413.7477342567},{"datetime":"2020-09-10T12:00+08:00","value":84410.1517424973},{"datetime":"2020-09-10T13:00+08:00","value":84330.1517424973},{"datetime":"2020-09-10T14:00+08:00","value":84250.1517424973},{"datetime":"2020-09-10T15:00+08:00","value":84170.1517424973},{"datetime":"2020-09-10T16:00+08:00","value":84093.7477342566},{"datetime":"2020-09-10T17:00+08:00","value":84013.7477342566},{"datetime":"2020-09-10T18:00+08:00","value":84090.1517424973},{"datetime":"2020-09-10T19:00+08:00","value":84093.7477342566},{"datetime":"2020-09-10T20:00+08:00","value":84170.1517424973},{"datetime":"2020-09-10T21:00+08:00","value":84173.7477342567},{"datetime":"2020-09-10T22:00+08:00","value":84253.7477342567},{"datetime":"2020-09-10T23:00+08:00","value":84253.7477342567},{"datetime":"2020-09-11T00:00+08:00","value":84253.7477342566},{"datetime":"2020-09-11T01:00+08:00","value":84203.9627907379},{"datetime":"2020-09-11T02:00+08:00","value":84170.1517424973},{"datetime":"2020-09-11T03:00+08:00","value":84123.9627907379},{"datetime":"2020-09-11T04:00+08:00","value":84123.9627907379},{"datetime":"2020-09-11T05:00+08:00","value":84170.1517424973},{"datetime":"2020-09-11T06:00+08:00","value":84173.7477342567},{"datetime":"2020-09-11T07:00+08:00","value":84203.9627907379},{"datetime":"2020-09-11T08:00+08:00","value":84253.7477342566},{"datetime":"2020-09-11T09:00+08:00","value":84253.7477342567},{"datetime":"2020-09-11T10:00+08:00","value":84253.7477342567},{"datetime":"2020-09-11T11:00+08:00","value":84330.1517424973},{"datetime":"2020-09-11T12:00+08:00","value":84276.7383024973},{"datetime":"2020-09-11T13:00+08:00","value":84253.7477342566},{"datetime":"2020-09-11T14:00+08:00","value":84173.7477342567}],"visibility":[{"datetime":"2020-09-09T15:00+08:00","value":30.0},{"datetime":"2020-09-09T16:00+08:00","value":30.0},{"datetime":"2020-09-09T17:00+08:00","value":30.0},{"datetime":"2020-09-09T18:00+08:00","value":30.0},{"datetime":"2020-09-09T19:00+08:00","value":30.0},{"datetime":"2020-09-09T20:00+08:00","value":30.0},{"datetime":"2020-09-09T21:00+08:00","value":30.0},{"datetime":"2020-09-09T22:00+08:00","value":30.0},{"datetime":"2020-09-09T23:00+08:00","value":30.0},{"datetime":"2020-09-10T00:00+08:00","value":30.0},{"datetime":"2020-09-10T01:00+08:00","value":30.0},{"datetime":"2020-09-10T02:00+08:00","value":30.0},{"datetime":"2020-09-10T03:00+08:00","value":30.0},{"datetime":"2020-09-10T04:00+08:00","value":30.0},{"datetime":"2020-09-10T05:00+08:00","value":30.0},{"datetime":"2020-09-10T06:00+08:00","value":30.0},{"datetime":"2020-09-10T07:00+08:00","value":30.0},{"datetime":"2020-09-10T08:00+08:00","value":30.0},{"datetime":"2020-09-10T09:00+08:00","value":30.0},{"datetime":"2020-09-10T10:00+08:00","value":30.0},{"datetime":"2020-09-10T11:00+08:00","value":30.0},{"datetime":"2020-09-10T12:00+08:00","value":30.0},{"datetime":"2020-09-10T13:00+08:00","value":30.0},{"datetime":"2020-09-10T14:00+08:00","value":30.0},{"datetime":"2020-09-10T15:00+08:00","value":30.0},{"datetime":"2020-09-10T16:00+08:00","value":30.0},{"datetime":"2020-09-10T17:00+08:00","value":30.0},{"datetime":"2020-09-10T18:00+08:00","value":30.0},{"datetime":"2020-09-10T19:00+08:00","value":30.0},{"datetime":"2020-09-10T20:00+08:00","value":30.0},{"datetime":"2020-09-10T21:00+08:00","value":30.0},{"datetime":"2020-09-10T22:00+08:00","value":30.0},{"datetime":"2020-09-10T23:00+08:00","value":30.0},{"datetime":"2020-09-11T00:00+08:00","value":30.0},{"datetime":"2020-09-11T01:00+08:00","value":30.0},{"datetime":"2020-09-11T02:00+08:00","value":30.0},{"datetime":"2020-09-11T03:00+08:00","value":30.0},{"datetime":"2020-09-11T04:00+08:00","value":30.0},{"datetime":"2020-09-11T05:00+08:00","value":30.0},{"datetime":"2020-09-11T06:00+08:00","value":30.0},{"datetime":"2020-09-11T07:00+08:00","value":30.0},{"datetime":"2020-09-11T08:00+08:00","value":30.0},{"datetime":"2020-09-11T09:00+08:00","value":30.0},{"datetime":"2020-09-11T10:00+08:00","value":30.0},{"datetime":"2020-09-11T11:00+08:00","value":30.0},{"datetime":"2020-09-11T12:00+08:00","value":30.0},{"datetime":"2020-09-11T13:00+08:00","value":30.0},{"datetime":"2020-09-11T14:00+08:00","value":30.0}],"dswrf":[{"datetime":"2020-09-09T15:00+08:00","value":761.7760820602},{"datetime":"2020-09-09T16:00+08:00","value":696.0024630902},{"datetime":"2020-09-09T17:00+08:00","value":620.2288441203},{"datetime":"2020-09-09T18:00+08:00","value":546.5089866782},{"datetime":"2020-09-09T19:00+08:00","value":460.2864285752},{"datetime":"2020-09-09T20:00+08:00","value":384.9761620602},{"datetime":"2020-09-09T21:00+08:00","value":0.0},{"datetime":"2020-09-09T22:00+08:00","value":0.0},{"datetime":"2020-09-09T23:00+08:00","value":0.0},{"datetime":"2020-09-10T00:00+08:00","value":0.0},{"datetime":"2020-09-10T01:00+08:00","value":0.0},{"datetime":"2020-09-10T02:00+08:00","value":0.0},{"datetime":"2020-09-10T03:00+08:00","value":0.0},{"datetime":"2020-09-10T04:00+08:00","value":0.0},{"datetime":"2020-09-10T05:00+08:00","value":0.0},{"datetime":"2020-09-10T06:00+08:00","value":0.0},{"datetime":"2020-09-10T07:00+08:00","value":0.0},{"datetime":"2020-09-10T08:00+08:00","value":10.955050103},{"datetime":"2020-09-10T09:00+08:00","value":248.64744},{"datetime":"2020-09-10T10:00+08:00","value":348.64744},{"datetime":"2020-09-10T11:00+08:00","value":439.0969389699},{"datetime":"2020-09-10T12:00+08:00","value":516.522987382},{"datetime":"2020-09-10T13:00+08:00","value":577.145705485},{"datetime":"2020-09-10T14:00+08:00","value":613.3138890729},{"datetime":"2020-09-10T15:00+08:00","value":743.7728189699},{"datetime":"2020-09-10T16:00+08:00","value":691.97076},{"datetime":"2020-09-10T17:00+08:00","value":607.7443789699},{"datetime":"2020-09-10T18:00+08:00","value":518.64744},{"datetime":"2020-09-10T19:00+08:00","value":431.5212610301},{"datetime":"2020-09-10T20:00+08:00","value":360.822450515},{"datetime":"2020-09-10T21:00+08:00","value":0.0},{"datetime":"2020-09-10T22:00+08:00","value":0.0},{"datetime":"2020-09-10T23:00+08:00","value":0.0},{"datetime":"2020-09-11T00:00+08:00","value":0.0},{"datetime":"2020-09-11T01:00+08:00","value":0.0},{"datetime":"2020-09-11T02:00+08:00","value":0.0},{"datetime":"2020-09-11T03:00+08:00","value":0.0},{"datetime":"2020-09-11T04:00+08:00","value":0.0},{"datetime":"2020-09-11T05:00+08:00","value":0.0},{"datetime":"2020-09-11T06:00+08:00","value":0.0},{"datetime":"2020-09-11T07:00+08:00","value":0.0},{"datetime":"2020-09-11T08:00+08:00","value":10.0},{"datetime":"2020-09-11T09:00+08:00","value":240.0},{"datetime":"2020-09-11T10:00+08:00","value":337.7484420602},{"datetime":"2020-09-11T11:00+08:00","value":425.0392589699},{"datetime":"2020-09-11T12:00+08:00","value":499.6904631759},{"datetime":"2020-09-11T13:00+08:00","value":559.8413703519},{"datetime":"2020-09-11T14:00+08:00","value":600.7432124549}],"air_quality":{"aqi":[{"datetime":"2020-09-09T15:00+08:00","value":{"chn":7,"usa":7}},{"datetime":"2020-09-09T16:00+08:00","value":{"chn":8,"usa":8}},{"datetime":"2020-09-09T17:00+08:00","value":{"chn":8,"usa":8}},{"datetime":"2020-09-09T18:00+08:00","value":{"chn":7,"usa":7}},{"datetime":"2020-09-09T19:00+08:00","value":{"chn":7,"usa":7}},{"datetime":"2020-09-09T20:00+08:00","value":{"chn":7,"usa":7}},{"datetime":"2020-09-09T21:00+08:00","value":{"chn":8,"usa":8}},{"datetime":"2020-09-09T22:00+08:00","value":{"chn":8,"usa":8}},{"datetime":"2020-09-09T23:00+08:00","value":{"chn":8,"usa":8}},{"datetime":"2020-09-10T00:00+08:00","value":{"chn":8,"usa":8}},{"datetime":"2020-09-10T01:00+08:00","value":{"chn":7,"usa":7}},{"datetime":"2020-09-10T02:00+08:00","value":{"chn":7,"usa":7}},{"datetime":"2020-09-10T03:00+08:00","value":{"chn":7,"usa":7}},{"datetime":"2020-09-10T04:00+08:00","value":{"chn":8,"usa":8}},{"datetime":"2020-09-10T05:00+08:00","value":{"chn":8,"usa":8}},{"datetime":"2020-09-10T06:00+08:00","value":{"chn":8,"usa":8}},{"datetime":"2020-09-10T07:00+08:00","value":{"chn":7,"usa":7}},{"datetime":"2020-09-10T08:00+08:00","value":{"chn":7,"usa":7}},{"datetime":"2020-09-10T09:00+08:00","value":{"chn":8,"usa":8}},{"datetime":"2020-09-10T10:00+08:00","value":{"chn":8,"usa":8}},{"datetime":"2020-09-10T11:00+08:00","value":{"chn":8,"usa":8}},{"datetime":"2020-09-10T12:00+08:00","value":{"chn":8,"usa":8}},{"datetime":"2020-09-10T13:00+08:00","value":{"chn":7,"usa":7}},{"datetime":"2020-09-10T14:00+08:00","value":{"chn":7,"usa":7}},{"datetime":"2020-09-10T15:00+08:00","value":{"chn":7,"usa":7}},{"datetime":"2020-09-10T16:00+08:00","value":{"chn":8,"usa":8}},{"datetime":"2020-09-10T17:00+08:00","value":{"chn":8,"usa":8}},{"datetime":"2020-09-10T18:00+08:00","value":{"chn":8,"usa":8}},{"datetime":"2020-09-10T19:00+08:00","value":{"chn":7,"usa":7}},{"datetime":"2020-09-10T20:00+08:00","value":{"chn":7,"usa":7}},{"datetime":"2020-09-10T21:00+08:00","value":{"chn":8,"usa":8}},{"datetime":"2020-09-10T22:00+08:00","value":{"chn":8,"usa":8}},{"datetime":"2020-09-10T23:00+08:00","value":{"chn":8,"usa":8}},{"datetime":"2020-09-11T00:00+08:00","value":{"chn":8,"usa":8}},{"datetime":"2020-09-11T01:00+08:00","value":{"chn":7,"usa":7}},{"datetime":"2020-09-11T02:00+08:00","value":{"chn":7,"usa":7}},{"datetime":"2020-09-11T03:00+08:00","value":{"chn":8,"usa":8}},{"datetime":"2020-09-11T04:00+08:00","value":{"chn":8,"usa":8}},{"datetime":"2020-09-11T05:00+08:00","value":{"chn":8,"usa":8}},{"datetime":"2020-09-11T06:00+08:00","value":{"chn":8,"usa":8}},{"datetime":"2020-09-11T07:00+08:00","value":{"chn":7,"usa":7}},{"datetime":"2020-09-11T08:00+08:00","value":{"chn":7,"usa":7}},{"datetime":"2020-09-11T09:00+08:00","value":{"chn":8,"usa":8}},{"datetime":"2020-09-11T10:00+08:00","value":{"chn":8,"usa":8}},{"datetime":"2020-09-11T11:00+08:00","value":{"chn":8,"usa":8}},{"datetime":"2020-09-11T12:00+08:00","value":{"chn":8,"usa":8}},{"datetime":"2020-09-11T13:00+08:00","value":{"chn":7,"usa":7}},{"datetime":"2020-09-11T14:00+08:00","value":{"chn":7,"usa":7}}],"pm25":[{"datetime":"2020-09-09T15:00+08:00","value":3},{"datetime":"2020-09-09T16:00+08:00","value":3},{"datetime":"2020-09-09T17:00+08:00","value":3},{"datetime":"2020-09-09T18:00+08:00","value":3},{"datetime":"2020-09-09T19:00+08:00","value":4},{"datetime":"2020-09-09T20:00+08:00","value":4},{"datetime":"2020-09-09T21:00+08:00","value":4},{"datetime":"2020-09-09T22:00+08:00","value":3},{"datetime":"2020-09-09T23:00+08:00","value":3},{"datetime":"2020-09-10T00:00+08:00","value":4},{"datetime":"2020-09-10T01:00+08:00","value":4},{"datetime":"2020-09-10T02:00+08:00","value":4},{"datetime":"2020-09-10T03:00+08:00","value":5},{"datetime":"2020-09-10T04:00+08:00","value":5},{"datetime":"2020-09-10T05:00+08:00","value":5},{"datetime":"2020-09-10T06:00+08:00","value":5},{"datetime":"2020-09-10T07:00+08:00","value":4},{"datetime":"2020-09-10T08:00+08:00","value":4},{"datetime":"2020-09-10T09:00+08:00","value":5},{"datetime":"2020-09-10T10:00+08:00","value":5},{"datetime":"2020-09-10T11:00+08:00","value":5},{"datetime":"2020-09-10T12:00+08:00","value":5},{"datetime":"2020-09-10T13:00+08:00","value":4},{"datetime":"2020-09-10T14:00+08:00","value":4},{"datetime":"2020-09-10T15:00+08:00","value":4},{"datetime":"2020-09-10T16:00+08:00","value":4},{"datetime":"2020-09-10T17:00+08:00","value":4},{"datetime":"2020-09-10T18:00+08:00","value":4},{"datetime":"2020-09-10T19:00+08:00","value":5},{"datetime":"2020-09-10T20:00+08:00","value":4},{"datetime":"2020-09-10T21:00+08:00","value":5},{"datetime":"2020-09-10T22:00+08:00","value":5},{"datetime":"2020-09-10T23:00+08:00","value":5},{"datetime":"2020-09-11T00:00+08:00","value":5},{"datetime":"2020-09-11T01:00+08:00","value":6},{"datetime":"2020-09-11T02:00+08:00","value":6},{"datetime":"2020-09-11T03:00+08:00","value":6},{"datetime":"2020-09-11T04:00+08:00","value":5},{"datetime":"2020-09-11T05:00+08:00","value":5},{"datetime":"2020-09-11T06:00+08:00","value":6},{"datetime":"2020-09-11T07:00+08:00","value":6},{"datetime":"2020-09-11T08:00+08:00","value":6},{"datetime":"2020-09-11T09:00+08:00","value":6},{"datetime":"2020-09-11T10:00+08:00","value":5},{"datetime":"2020-09-11T11:00+08:00","value":5},{"datetime":"2020-09-11T12:00+08:00","value":5},{"datetime":"2020-09-11T13:00+08:00","value":4},{"datetime":"2020-09-11T14:00+08:00","value":5}]}},"daily":{"status":"ok","astro":[{"date":"2020-09-09T00:00+08:00","sunrise":{"time":"06:49"},"sunset":{"time":"19:31"}},{"date":"2020-09-10T00:00+08:00","sunrise":{"time":"06:50"},"sunset":{"time":"19:30"}},{"date":"2020-09-11T00:00+08:00","sunrise":{"time":"06:51"},"sunset":{"time":"19:28"}},{"date":"2020-09-12T00:00+08:00","sunrise":{"time":"06:52"},"sunset":{"time":"19:27"}},{"date":"2020-09-13T00:00+08:00","sunrise":{"time":"06:52"},"sunset":{"time":"19:25"}}],"precipitation":[{"date":"2020-09-09T00:00+08:00","max":0.0,"min":0.0,"avg":0.0},{"date":"2020-09-10T00:00+08:00","max":0.0,"min":0.0,"avg":0.0},{"date":"2020-09-11T00:00+08:00","max":0.0,"min":0.0,"avg":0.0},{"date":"2020-09-12T00:00+08:00","max":0.0,"min":0.0,"avg":0.0},{"date":"2020-09-13T00:00+08:00","max":0.0,"min":0.0,"avg":0.0}],"temperature":[{"date":"2020-09-09T00:00+08:00","max":22.67,"min":15.0,"avg":21.29},{"date":"2020-09-10T00:00+08:00","max":26.0,"min":16.0,"avg":20.79},{"date":"2020-09-11T00:00+08:00","max":27.0,"min":16.0,"avg":21.4},{"date":"2020-09-12T00:00+08:00","max":19.0,"min":13.0,"avg":16.55},{"date":"2020-09-13T00:00+08:00","max":19.0,"min":10.0,"avg":14.85}],"wind":[{"date":"2020-09-09T00:00+08:00","max":{"speed":29.82,"direction":139.85},"min":{"speed":3.45,"direction":126.48},"avg":{"speed":12.45,"direction":138.41}},{"date":"2020-09-10T00:00+08:00","max":{"speed":31.74,"direction":122.41},"min":{"speed":21.24,"direction":125.26},"avg":{"speed":27.73,"direction":123.46}},{"date":"2020-09-11T00:00+08:00","max":{"speed":34.44,"direction":132.33},"min":{"speed":1.18,"direction":106.37},"avg":{"speed":16.47,"direction":128.58}},{"date":"2020-09-12T00:00+08:00","max":{"speed":29.38,"direction":336.52},"min":{"speed":10.2,"direction":327.68},"avg":{"speed":16.97,"direction":344.7}},{"date":"2020-09-13T00:00+08:00","max":{"speed":27.07,"direction":344.38},"min":{"speed":8.41,"direction":327.67},"avg":{"speed":16.33,"direction":342.96}}],"humidity":[{"date":"2020-09-09T00:00+08:00","max":0.63,"min":0.34,"avg":0.42},{"date":"2020-09-10T00:00+08:00","max":0.66,"min":0.28,"avg":0.46},{"date":"2020-09-11T00:00+08:00","max":0.54,"min":0.22,"avg":0.38},{"date":"2020-09-12T00:00+08:00","max":0.42,"min":0.2,"avg":0.3},{"date":"2020-09-13T00:00+08:00","max":0.23,"min":0.15,"avg":0.17}],"cloudrate":[{"date":"2020-09-09T00:00+08:00","max":1.0,"min":0.0,"avg":0.09},{"date":"2020-09-10T00:00+08:00","max":1.0,"min":0.0,"avg":0.38},{"date":"2020-09-11T00:00+08:00","max":1.0,"min":0.0,"avg":0.41},{"date":"2020-09-12T00:00+08:00","max":0.91,"min":0.0,"avg":0.37},{"date":"2020-09-13T00:00+08:00","max":1.0,"min":0.0,"avg":0.82}],"pressure":[{"date":"2020-09-09T00:00+08:00","max":84763.96,"min":84420.97,"avg":84503.67},{"date":"2020-09-10T00:00+08:00","max":84570.15,"min":84013.75,"avg":84322.54},{"date":"2020-09-11T00:00+08:00","max":84413.75,"min":84093.75,"avg":84213.88},{"date":"2020-09-12T00:00+08:00","max":84733.75,"min":84493.75,"avg":84598.2},{"date":"2020-09-13T00:00+08:00","max":85083.96,"min":84660.97,"avg":84926.32}],"visibility":[{"date":"2020-09-09T00:00+08:00","max":30.0,"min":24.13,"avg":30.0},{"date":"2020-09-10T00:00+08:00","max":30.0,"min":30.0,"avg":30.0},{"date":"2020-09-11T00:00+08:00","max":30.0,"min":30.0,"avg":30.0},{"date":"2020-09-12T00:00+08:00","max":30.0,"min":30.0,"avg":30.0},{"date":"2020-09-13T00:00+08:00","max":30.0,"min":30.0,"avg":30.0}],"dswrf":[{"date":"2020-09-09T00:00+08:00","max":761.8,"min":0.0,"avg":385.5},{"date":"2020-09-10T00:00+08:00","max":743.8,"min":0.0,"avg":254.5},{"date":"2020-09-11T00:00+08:00","max":741.1,"min":0.0,"avg":255.6},{"date":"2020-09-12T00:00+08:00","max":763.3,"min":0.0,"avg":257.0},{"date":"2020-09-13T00:00+08:00","max":685.8,"min":0.0,"avg":202.3}],"air_quality":{"aqi":[{"date":"2020-09-09T00:00+08:00","max":{"chn":11,"usa":11},"avg":{"chn":7.56,"usa":7.56},"min":{"chn":7,"usa":7}},{"date":"2020-09-10T00:00+08:00","max":{"chn":8,"usa":8},"avg":{"chn":7.58,"usa":7.58},"min":{"chn":7,"usa":7}},{"date":"2020-09-11T00:00+08:00","max":{"chn":8,"usa":8},"avg":{"chn":7.67,"usa":7.67},"min":{"chn":7,"usa":7}},{"date":"2020-09-12T00:00+08:00","max":{"chn":8,"usa":8},"avg":{"chn":7.54,"usa":7.54},"min":{"chn":7,"usa":7}},{"date":"2020-09-13T00:00+08:00","max":{"chn":8,"usa":8},"avg":{"chn":7.54,"usa":7.54},"min":{"chn":7,"usa":7}}],"pm25":[{"date":"2020-09-09T00:00+08:00","max":6,"avg":3.33,"min":3},{"date":"2020-09-10T00:00+08:00","max":5,"avg":4.5,"min":4},{"date":"2020-09-11T00:00+08:00","max":6,"avg":4.75,"min":3},{"date":"2020-09-12T00:00+08:00","max":5,"avg":3.96,"min":3},{"date":"2020-09-13T00:00+08:00","max":5,"avg":4.25,"min":3}]},"skycon":[{"date":"2020-09-09T00:00+08:00","value":"CLEAR_DAY"},{"date":"2020-09-10T00:00+08:00","value":"PARTLY_CLOUDY_DAY"},{"date":"2020-09-11T00:00+08:00","value":"PARTLY_CLOUDY_DAY"},{"date":"2020-09-12T00:00+08:00","value":"PARTLY_CLOUDY_DAY"},{"date":"2020-09-13T00:00+08:00","value":"CLOUDY"}],"skycon_08h_20h":[{"date":"2020-09-09T00:00+08:00","value":"PARTLY_CLOUDY_DAY"},{"date":"2020-09-10T00:00+08:00","value":"PARTLY_CLOUDY_DAY"},{"date":"2020-09-11T00:00+08:00","value":"CLEAR_DAY"},{"date":"2020-09-12T00:00+08:00","value":"CLEAR_DAY"},{"date":"2020-09-13T00:00+08:00","value":"CLOUDY"}],"skycon_20h_32h":[{"date":"2020-09-09T00:00+08:00","value":"CLEAR_NIGHT"},{"date":"2020-09-10T00:00+08:00","value":"CLOUDY"},{"date":"2020-09-11T00:00+08:00","value":"PARTLY_CLOUDY_NIGHT"},{"date":"2020-09-12T00:00+08:00","value":"PARTLY_CLOUDY_NIGHT"},{"date":"2020-09-13T00:00+08:00","value":"PARTLY_CLOUDY_NIGHT"}],"life_index":{"ultraviolet":[{"date":"2020-09-09T00:00+08:00","index":"3","desc":"\u4e2d\u7b49"},{"date":"2020-09-10T00:00+08:00","index":"4","desc":"\u5f3a"},{"date":"2020-09-11T00:00+08:00","index":"4","desc":"\u5f3a"},{"date":"2020-09-12T00:00+08:00","index":"4","desc":"\u5f3a"},{"date":"2020-09-13T00:00+08:00","index":"1","desc":"\u6700\u5f31"}],"carWashing":[{"date":"2020-09-09T00:00+08:00","index":"1","desc":"\u9002\u5b9c"},{"date":"2020-09-10T00:00+08:00","index":"1","desc":"\u9002\u5b9c"},{"date":"2020-09-11T00:00+08:00","index":"1","desc":"\u9002\u5b9c"},{"date":"2020-09-12T00:00+08:00","index":"1","desc":"\u9002\u5b9c"},{"date":"2020-09-13T00:00+08:00","index":"1","desc":"\u9002\u5b9c"}],"dressing":[{"date":"2020-09-09T00:00+08:00","index":"4","desc":"\u6e29\u6696"},{"date":"2020-09-10T00:00+08:00","index":"5","desc":"\u51c9\u723d"},{"date":"2020-09-11T00:00+08:00","index":"5","desc":"\u51c9\u723d"},{"date":"2020-09-12T00:00+08:00","index":"5","desc":"\u51c9\u723d"},{"date":"2020-09-13T00:00+08:00","index":"6","desc":"\u51b7"}],"comfort":[{"date":"2020-09-09T00:00+08:00","index":"5","desc":"\u8212\u9002"},{"date":"2020-09-10T00:00+08:00","index":"5","desc":"\u8212\u9002"},{"date":"2020-09-11T00:00+08:00","index":"5","desc":"\u8212\u9002"},{"date":"2020-09-12T00:00+08:00","index":"6","desc":"\u51c9\u723d"},{"date":"2020-09-13T00:00+08:00","index":"7","desc":"\u51b7"}],"coldRisk":[{"date":"2020-09-09T00:00+08:00","index":"4","desc":"\u6781\u6613\u53d1"},{"date":"2020-09-10T00:00+08:00","index":"4","desc":"\u6781\u6613\u53d1"},{"date":"2020-09-11T00:00+08:00","index":"4","desc":"\u6781\u6613\u53d1"},{"date":"2020-09-12T00:00+08:00","index":"3","desc":"\u6613\u53d1"},{"date":"2020-09-13T00:00+08:00","index":"4","desc":"\u6781\u6613\u53d1"}]}},"primary":0,"forecast_keypoint":"\u672a\u676524\u5c0f\u65f6\u6674","alert":{"status":"ok","content":[]}}} \ No newline at end of file diff --git a/tests/test_load_from_dict.py b/tests/test_load_from_dict.py new file mode 100644 index 0000000..023177e --- /dev/null +++ b/tests/test_load_from_dict.py @@ -0,0 +1,17 @@ +import unittest +import json +from unittest import TestCase + +from cy_weather_api import initFromDict + + +class TestSDK(TestCase): + def test_init_from_dict(self): + with open("tests/data/sample1.json") as f: + data = json.loads(f.read()) + item = initFromDict(data) + self.assertEqual(item.status, "ok") + + +if __name__ == "__main__": + unittest.main()