diff --git a/src/python/test.py b/src/python/test.py new file mode 100644 index 0000000000000000000000000000000000000000..3e434d76024a64cc5d8f2150b3cc769eb1fb5b7b --- /dev/null +++ b/src/python/test.py @@ -0,0 +1,8 @@ +import serial, struct, time, urllib.request, json + +with urllib.request.urlopen("http://localhost/api-greentyno/getStatus.php?id=1") as url: + data = json.loads(url.read().decode()) + +print(data) +year = data['year'] +print(year)