First version of python dd-api-oper module
This commit is contained in:
44
test-ddapi
Executable file
44
test-ddapi
Executable file
@@ -0,0 +1,44 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import logging
|
||||
from ddapioper import ddApiOper
|
||||
from pprint import pprint
|
||||
|
||||
def locations(rws):
|
||||
l = rws.locations()
|
||||
print(type(l))
|
||||
for f in l.locationNames():
|
||||
print(f)
|
||||
|
||||
def quantities(rws):
|
||||
q = rws.quantities()
|
||||
print(type(q))
|
||||
for f in q.quantities():
|
||||
print(f)
|
||||
|
||||
def quantitiesHoekvanHolland(rws):
|
||||
q = rws.location_quantities("hoekvanholland")
|
||||
print(type(q))
|
||||
for f in q.quantities():
|
||||
print(f)
|
||||
|
||||
def waterlevelHoekvanHolland(rws):
|
||||
v = rws.values("hoekvanholland", "waterlevel")
|
||||
pprint(v.source())
|
||||
pprint(v.provider())
|
||||
pprint(v.aspectSet())
|
||||
pprint(v.location())
|
||||
for i in v.values():
|
||||
pprint(i)
|
||||
print(v.sip())
|
||||
|
||||
def main():
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
rws = ddApiOper("<TODO>.crt", "<TODO>.key")
|
||||
#locations(rws)
|
||||
#quantities(rws)
|
||||
#quantitiesHoekvanHolland(rws)
|
||||
waterlevelHoekvanHolland(rws)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
Reference in New Issue
Block a user