Skip to content

Commit e095284

Browse files
committed
docs: variant of possible usage
1 parent f218179 commit e095284

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,11 @@ import .my_datamodel as my_model
179179
from geojson import Point
180180
181181
service = fsc.SensorThingsService(model=my_model)
182+
m = service.model
182183
183184
point = Point((-115.81, 37.24))
184-
location = my_model.Location(name="here", description="and there", location=point, encoding_type='application/geo+json')
185-
thing = my_model.Thing(name='new thing',
185+
location = m.Location(name="here", description="and there", location=point, encoding_type='application/geo+json')
186+
thing = m.Thing(name='new thing',
186187
description='I am a thing with a location',
187188
properties={'withLocation': True, 'owner': 'IOSB'})
188189
thing.locations = [location]

0 commit comments

Comments
 (0)