- add Piezometer data via json (Gschliegraben)
This commit is contained in:
parent
941d2006a1
commit
095cfdfe24
7 changed files with 145 additions and 22 deletions
|
@ -42,7 +42,7 @@ def main():
|
|||
dump_data = observation_schema.dump(observation)
|
||||
print(dump_data)
|
||||
|
||||
# # deserialize
|
||||
# # deserialize to db model
|
||||
# load_data: Person = person_schema.load(dump_data)
|
||||
# print(load_data)
|
||||
|
||||
|
@ -60,9 +60,13 @@ def main():
|
|||
token_api = os.environ.get("TOKEN_API")
|
||||
test_api = MyApi(token_api)
|
||||
data = test_api.getSensorData("inclino1_14")
|
||||
print(data)
|
||||
|
||||
observation_array = (data['FeatureCollection']['Features'][0]['geometry']['properties'][0])
|
||||
print(observation_array)
|
||||
# create(dump_data)
|
||||
# # deserialize to db model
|
||||
observation_schema = ObservationSchema(many=True)
|
||||
observations: Observation = observation_schema.load(observation_array)
|
||||
print(observations)
|
||||
|
||||
|
||||
def create(person_json: PersonSchema):
|
||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue