staplus-client 0.3.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- staplus_client/__init__.py +47 -0
- staplus_client/__version__.py +8 -0
- staplus_client/dao/__init__.py +18 -0
- staplus_client/dao/actuator.py +30 -0
- staplus_client/dao/base.py +70 -0
- staplus_client/dao/campaign.py +25 -0
- staplus_client/dao/datastream.py +35 -0
- staplus_client/dao/features_of_interest.py +36 -0
- staplus_client/dao/historical_location.py +35 -0
- staplus_client/dao/license.py +25 -0
- staplus_client/dao/location.py +35 -0
- staplus_client/dao/multi_datastream.py +36 -0
- staplus_client/dao/observation.py +55 -0
- staplus_client/dao/observation_group.py +25 -0
- staplus_client/dao/observedproperty.py +35 -0
- staplus_client/dao/party.py +25 -0
- staplus_client/dao/relation.py +57 -0
- staplus_client/dao/sensor.py +35 -0
- staplus_client/dao/task.py +30 -0
- staplus_client/dao/tasking_capability.py +30 -0
- staplus_client/dao/thing.py +36 -0
- staplus_client/model/__init__.py +29 -0
- staplus_client/model/campaign.py +417 -0
- staplus_client/model/datastream.py +166 -0
- staplus_client/model/entity.py +29 -0
- staplus_client/model/ext/__init__.py +0 -0
- staplus_client/model/ext/entity_list.py +75 -0
- staplus_client/model/ext/entity_type.py +142 -0
- staplus_client/model/ext/unitofmeasurement.py +5 -0
- staplus_client/model/feature_of_interest.py +17 -0
- staplus_client/model/historical_location.py +21 -0
- staplus_client/model/license.py +301 -0
- staplus_client/model/location.py +22 -0
- staplus_client/model/multi_datastream.py +160 -0
- staplus_client/model/observation.py +218 -0
- staplus_client/model/observation_group.py +399 -0
- staplus_client/model/observedproperty.py +20 -0
- staplus_client/model/party.py +315 -0
- staplus_client/model/relation.py +246 -0
- staplus_client/model/sensor.py +16 -0
- staplus_client/model/thing.py +110 -0
- staplus_client/query/__init__.py +0 -0
- staplus_client/query/query.py +109 -0
- staplus_client/service/BearerAuth.py +23 -0
- staplus_client/service/__init__.py +17 -0
- staplus_client/service/auth_handler.py +23 -0
- staplus_client/service/staplusservice.py +162 -0
- staplus_client/utils.py +64 -0
- staplus_client-0.3.3.dist-info/LICENSE +165 -0
- staplus_client-0.3.3.dist-info/METADATA +470 -0
- staplus_client-0.3.3.dist-info/RECORD +53 -0
- staplus_client-0.3.3.dist-info/WHEEL +5 -0
- staplus_client-0.3.3.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,470 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: staplus-client
|
|
3
|
+
Version: 0.3.3
|
|
4
|
+
Summary: A client library to facilitate interaction with a STAplus Server
|
|
5
|
+
Home-page: https://github.com/securedimensions/STAplus-Python-Client
|
|
6
|
+
Author: Andreas Matheus
|
|
7
|
+
Author-email: andreas.matheus@secure-dimensions.de
|
|
8
|
+
License: LGPL3
|
|
9
|
+
Keywords: ogc,staplus,sensorthingsapi,IoT
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Requires-Dist: demjson3 >=3.0.5
|
|
13
|
+
Requires-Dist: furl >=2.1.3
|
|
14
|
+
Requires-Dist: geojson >=2.5.0
|
|
15
|
+
Requires-Dist: jsonpickle >=2.0.0
|
|
16
|
+
Requires-Dist: requests >=2.26.0
|
|
17
|
+
Requires-Dist: jsonpatch
|
|
18
|
+
Requires-Dist: python-dateutil
|
|
19
|
+
Requires-Dist: pillow
|
|
20
|
+
Requires-Dist: sd-frost-sta-client
|
|
21
|
+
|
|
22
|
+
# OGC STAplus (SensorThings) API Python Client
|
|
23
|
+
|
|
24
|
+
This STAplus Python Client implements the [STAplus](https://docs.ogc.org/is/22-022r1/22-022r1.html) API. The aim is to simplify development of STAplus and SensorThings enabled client applications.
|
|
25
|
+
|
|
26
|
+
**_NOTE:_** This implementation is an extension to the [FROST API Python Client](https://github.com/FraunhoferIOSB/FROST-Python-Client). To have better control over bug fixing and improvements, this implementation is actually based on a fork of the FROST API Python Client, hosted on a Secure Dimensions Github repository: [STA Python Client](https://github.com/securedimensions/STA-Python-Client).
|
|
27
|
+
|
|
28
|
+
## Python Version
|
|
29
|
+
This library requires Python 3.11 or better to support parsing ISO datetime values (`datetime.datetime.fromisoformat`). See [here](https://docs.python.org/3/library/datetime.html#datetime.datetime.fromisoformat) for more information.
|
|
30
|
+
|
|
31
|
+
## Features
|
|
32
|
+
* Support for all STAplus and SensorThings entity types
|
|
33
|
+
* CRUD operations
|
|
34
|
+
* Queries on entity lists
|
|
35
|
+
* Query on single entity
|
|
36
|
+
* MultiDatastreams
|
|
37
|
+
* Cloning Entities
|
|
38
|
+
* Fetching entities relative to an entity (using many-association)
|
|
39
|
+
* Fetching one single entity relative to an entity (using one-association)
|
|
40
|
+
|
|
41
|
+
## Installation via PyPi
|
|
42
|
+
Installation via pip: `pip install staplus-client`
|
|
43
|
+
|
|
44
|
+
## Limitations
|
|
45
|
+
This implementation has the following limitations for the Entity `Location` and `FeatureOfInterest`:
|
|
46
|
+
|
|
47
|
+
* `Location/location` must be a GeoJSON Geometry object (this is an Any in the SensorThings datamodel)
|
|
48
|
+
* `FeatureOfInterest/feature` must be a GeoJSON Object (this is an Any in the SensorThings datamodel)
|
|
49
|
+
|
|
50
|
+
For both entities, the `encodingType` attribute is not tested by the implementation. For interoperability with other applications, the value should be `application/geo+json`.
|
|
51
|
+
|
|
52
|
+
## API
|
|
53
|
+
|
|
54
|
+
The `STAplusService` class is central to the library. An instance of it represents a STAplus service and is identified by a URI.
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
### Creating Entities via the STAplus Client
|
|
58
|
+
The source code below demonstrates how to initialize the client for a STAplus endpoint on `url`.
|
|
59
|
+
|
|
60
|
+
```python
|
|
61
|
+
import staplus_client as staplus
|
|
62
|
+
|
|
63
|
+
url = "<your domain>/staplus/v1.1"
|
|
64
|
+
service = staplus.STAplusService(url)
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
#### Configuring an Authentication Handler
|
|
68
|
+
When interacting with a STAplus service that has enabled authentication, the use of an `AuthHandler` is required.
|
|
69
|
+
|
|
70
|
+
```python
|
|
71
|
+
import staplus_client as staplus
|
|
72
|
+
|
|
73
|
+
url = "<your domain>/staplus/v1.1"
|
|
74
|
+
auth_handler.AuthHandler(...)
|
|
75
|
+
service = staPlus.STAplusService(url, auth_handler=auth)
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
#### Creating a Party Entity
|
|
79
|
+
The `Party` entity represents a user or an institution. When interacting with a STAplus service that has enabled authentication, the `Party` entity represents the acting user and access control controls Create, Update and Delete.
|
|
80
|
+
```python
|
|
81
|
+
import staplus_client as staplus
|
|
82
|
+
|
|
83
|
+
url = "<your domain>/staplus/v1.1"
|
|
84
|
+
auth_handler.AuthHandler(...)
|
|
85
|
+
service = staPlus.STAplusService(url, auth_handler=auth)
|
|
86
|
+
ljs = staPlus.Party(description='I am Long John Silver the opportunistic pirate created by Robert Louis Stevenson',
|
|
87
|
+
display_name='LJS',
|
|
88
|
+
role='individual')
|
|
89
|
+
service.create(ljs)
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
#### Creating a STAplus enriched Datastream
|
|
93
|
+
The STAplus `Datastream` is capable to have a `Party` and a `License` associated. Also, the `Thing` is associated to a `Party` entity.
|
|
94
|
+
```python
|
|
95
|
+
import staplus_client as staplus
|
|
96
|
+
|
|
97
|
+
url = "<your domain>/staplus/v1.1"
|
|
98
|
+
auth_handler.AuthHandler(...)
|
|
99
|
+
service = staplus.STAplusService(url, auth_handler=auth)
|
|
100
|
+
ljs = staplus.Party(description='I am Long John Silver the opportunistic pirate created by Robert Louis Stevenson',
|
|
101
|
+
display_name='LJS',
|
|
102
|
+
role='individual')
|
|
103
|
+
service.create(ljs)
|
|
104
|
+
|
|
105
|
+
# find the CC-BY license
|
|
106
|
+
cc_by = service.licenses().find('CC_BY')
|
|
107
|
+
|
|
108
|
+
# Create a thing associated to LJS
|
|
109
|
+
thing = staplus.Thing('Raspberry Pi', 'Raspberry Pi 4', )
|
|
110
|
+
thing.party = ljs
|
|
111
|
+
|
|
112
|
+
# Create a sensor
|
|
113
|
+
sensor = staplus.Sensor('air temperature sensor', 'SmartCitizen air temperature sensor', 'test/html', None,
|
|
114
|
+
'https://www.seeedstudio.com/Smart-Citizen-Starter-Kit-p-2865.html')
|
|
115
|
+
|
|
116
|
+
# Create a datastream associated to LJS with CC-BY license
|
|
117
|
+
datastream = staplus.Datastream('air temperature', 'air temperature measured with the SmartCitizen Kit',
|
|
118
|
+
'http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement',
|
|
119
|
+
staplus.UnitOfMeasurement('Celsius', 'C', 'https://qudt.org/vocab/unit/DEG_C'))
|
|
120
|
+
datastream.observed_property = staplus.ObservedProperty('temperature', 'http://vocabs.lter-europe.net/EnvThes/22035',
|
|
121
|
+
'air temperature')
|
|
122
|
+
datastream.party = ljs
|
|
123
|
+
datastream.thing = thing
|
|
124
|
+
datastream.sensor = sensor
|
|
125
|
+
datastream.license = cc_by
|
|
126
|
+
|
|
127
|
+
service.create(datastream)
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
#### Creating a few Observation entities
|
|
131
|
+
```python
|
|
132
|
+
import staplus_client as staplus
|
|
133
|
+
|
|
134
|
+
url = "<your domain>/staplus/v1.1"
|
|
135
|
+
auth_handler.AuthHandler(...)
|
|
136
|
+
service = staplus.STAplusService(url, auth_handler=auth)
|
|
137
|
+
ljs = staplus.Party(description='I am Long John Silver the opportunistic pirate created by Robert Louis Stevenson',
|
|
138
|
+
display_name='LJS',
|
|
139
|
+
role='individual')
|
|
140
|
+
service.create(ljs)
|
|
141
|
+
|
|
142
|
+
# The feature of interest
|
|
143
|
+
marienplatz = {
|
|
144
|
+
"type": "Feature",
|
|
145
|
+
"geometry": {
|
|
146
|
+
"type": "Point",
|
|
147
|
+
"coordinates": [11.571831046,48.135666124]
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
foi = staplus.FeatureOfInterest('Marienplatz', 'famous place in Munich', 'application/vnd.geo+json', marienplatz)
|
|
151
|
+
|
|
152
|
+
# The temperature
|
|
153
|
+
observation = staplus.Observation("2023-07-02T15:34:00Z", 20, "2023-07-02T15:34:00Z")
|
|
154
|
+
observation.feature_of_interest = foi
|
|
155
|
+
observation.datastream = service.datastreams().find(<the datastream id created previously>)
|
|
156
|
+
|
|
157
|
+
service.create(observation)
|
|
158
|
+
|
|
159
|
+
observation = staplus.Observation("2023-07-02T15:34:10Z", 21, "2023-07-02T15:34:10Z")
|
|
160
|
+
observation.feature_of_interest = foi
|
|
161
|
+
observation.datastream = service.datastreams().find(<the datastream id created previously>)
|
|
162
|
+
|
|
163
|
+
service.create(observation)
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
#### Creating an ObservationGroup Entity
|
|
167
|
+
A `ObservationGroup` entity can be used as a container of observations that belong together.
|
|
168
|
+
|
|
169
|
+
```python
|
|
170
|
+
import staplus_client as staplus
|
|
171
|
+
|
|
172
|
+
url = "<your domain>/staplus/v1.1"
|
|
173
|
+
service = staPlus.STAplusService(url, auth_handler=auth)
|
|
174
|
+
ljs = staPlus.Party(description='I am Long John Silver the opportunistic pirate created by Robert Louis Stevenson',
|
|
175
|
+
display_name='LJS',
|
|
176
|
+
role='individual')
|
|
177
|
+
service.create(ljs)
|
|
178
|
+
group = staPlus.ObservationGroup("Marienplatz", "observations on Marienplatz", "none", "")
|
|
179
|
+
group.creation_time = parse_datetime("2023-07-02T15:35:00Z")
|
|
180
|
+
# Add all the observations that are associated to the FoI named 'Marienplatz'
|
|
181
|
+
group.observations = service.observations().query().filter("FeatureOfInterest/name eq 'Marienplatz'").list()
|
|
182
|
+
group.license = service.licenses().find('CC_BY')
|
|
183
|
+
group.party = ljs
|
|
184
|
+
|
|
185
|
+
service.create(group)
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
#### Creating SensorThings Entities
|
|
189
|
+
How to use this implementation on SensorThings Entity Types, please see the [FROST-Python-Client](https://github.com/securedimensions/STAplus-Python-Client) documentation.
|
|
190
|
+
|
|
191
|
+
### Fetching Entities via the STAplus Client
|
|
192
|
+
This implementation supports the fetching of `EntityList` and `Entity`.
|
|
193
|
+
|
|
194
|
+
#### Fetching an EntityList
|
|
195
|
+
An `EntityList` is the result from fetching entities that have a multiplicity `0..*` or `1..*`. To fetch the list of entities, you need to use the `.list()` function. The following example fetches all datastreams:
|
|
196
|
+
|
|
197
|
+
```python
|
|
198
|
+
import staplus_client as staplus
|
|
199
|
+
|
|
200
|
+
url = "<your domain>/staplus/v1.1"
|
|
201
|
+
service = staplus.STAplusService(url)
|
|
202
|
+
datastreams = service.datastreams().query().list()
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
In order to get all entities of a given entity, you can use the function `get_<entity_plural>()`. For example, to fetch all datastreams of a given `Thing` please use the following code:
|
|
206
|
+
|
|
207
|
+
```python
|
|
208
|
+
import staplus_client as staplus
|
|
209
|
+
|
|
210
|
+
url = "<your domain>/staplus/v1.1"
|
|
211
|
+
service = staplus.STAplusService(url)
|
|
212
|
+
thing = service.things().find(1)
|
|
213
|
+
thing_datastreams = thing.get_datastreams().query().list()
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
#### Fetching an Entity
|
|
217
|
+
An `Entity` is the result from fetching an entity that has multiplicity `0..1` or `1`. To fetch one single entity you need to use the `.item()` function. The following example fetches the thing associated to a datastream:
|
|
218
|
+
|
|
219
|
+
```python
|
|
220
|
+
import staplus_client as staplus
|
|
221
|
+
|
|
222
|
+
url = "<your domain>/staplus/v1.1"
|
|
223
|
+
service = staplus.STAplusService(url)
|
|
224
|
+
datastream = service.datastreams().find(1).item()
|
|
225
|
+
datastream_thing = datastream.get_thing().query().item()
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### Cloning an Entity
|
|
229
|
+
When creating an Entity, mandatory entities can be provided either inline or by reference. To support the referencing of existing entities, the `clone()` function can be used. `clone()` returns a copy of the entity but only containing the `@iot.id`. This is important when preparing MQTT messages to publish observations.
|
|
230
|
+
|
|
231
|
+
#### Example ObservationGroup with inline entities
|
|
232
|
+
```JSON
|
|
233
|
+
{
|
|
234
|
+
"Observations": [
|
|
235
|
+
{
|
|
236
|
+
"Datastream": {
|
|
237
|
+
"@iot.id": 1,
|
|
238
|
+
"description": "desc",
|
|
239
|
+
"name": "new name",
|
|
240
|
+
"observationType": "OM_Observation",
|
|
241
|
+
"observedArea": {
|
|
242
|
+
"coordinates": [11.509234, 48.110728],
|
|
243
|
+
"type": "Point"
|
|
244
|
+
},
|
|
245
|
+
"phenomenonTime": "2023-07-24T06:30:18+00:00/2023-09-14T05:40:25.292000+00:00",
|
|
246
|
+
"resultTime": "2023-07-24T06:30:18+00:00/2023-07-24T06:31:42+00:00",
|
|
247
|
+
"unitOfMeasurement": { "definition": "...", "name": "n", "symbol": "n" }
|
|
248
|
+
},
|
|
249
|
+
"FeatureOfInterest": {
|
|
250
|
+
"@iot.id": 77,
|
|
251
|
+
"description": "A rainy place",
|
|
252
|
+
"encodingType": "application/geo+json",
|
|
253
|
+
"feature": { "coordinates": [-6.22299, 53.306816], "type": "Point" },
|
|
254
|
+
"name": "Dublin",
|
|
255
|
+
"properties": {
|
|
256
|
+
"datastreams": [1, 2, 76, 2, 78, 77],
|
|
257
|
+
"multi_datastreams": [11]
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
"phenomenonTime": "2024-04-13T19:57:08+00:00",
|
|
261
|
+
"result": 19.111,
|
|
262
|
+
"resultTime": "2024-05-02T19:36:06+00:00"
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"Datastream": {
|
|
266
|
+
"@iot.id": 2,
|
|
267
|
+
"description": "air relative humidity measured with the SmartCitizen Kit",
|
|
268
|
+
"name": "Relative Humidity",
|
|
269
|
+
"observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement",
|
|
270
|
+
"observedArea": {
|
|
271
|
+
"coordinates": [11.509234, 48.110728],
|
|
272
|
+
"type": "Point"
|
|
273
|
+
},
|
|
274
|
+
"phenomenonTime": "2023-07-24T06:30:18+00:00/2023-07-24T06:31:42+00:00",
|
|
275
|
+
"resultTime": "2023-07-24T06:30:18+00:00/2023-07-24T06:31:42+00:00",
|
|
276
|
+
"unitOfMeasurement": {
|
|
277
|
+
"definition": "https://qudt.org/vocab/unit/PERCENT",
|
|
278
|
+
"name": "Percentage",
|
|
279
|
+
"symbol": "%"
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
"FeatureOfInterest": {
|
|
283
|
+
"@iot.id": 77,
|
|
284
|
+
"description": "A rainy place",
|
|
285
|
+
"encodingType": "application/geo+json",
|
|
286
|
+
"feature": { "coordinates": [-6.22299, 53.306816], "type": "Point" },
|
|
287
|
+
"name": "Dublin",
|
|
288
|
+
"properties": {
|
|
289
|
+
"datastreams": [1, 2, 76, 2, 78, 77],
|
|
290
|
+
"multi_datastreams": [11]
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
"phenomenonTime": "2024-04-13T19:57:08+00:00",
|
|
294
|
+
"result": 43.0,
|
|
295
|
+
"resultTime": "2024-05-02T19:36:06+00:00"
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
"Datastream": {
|
|
299
|
+
"@iot.id": 76,
|
|
300
|
+
"description": "Precipitation measured with the FT-0310 Weather Station",
|
|
301
|
+
"name": "Rain",
|
|
302
|
+
"observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement",
|
|
303
|
+
"unitOfMeasurement": {
|
|
304
|
+
"definition": "https://qudt.org/vocab/unit/MilliM",
|
|
305
|
+
"name": "millimiter",
|
|
306
|
+
"symbol": "mm"
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
"FeatureOfInterest": {
|
|
310
|
+
"@iot.id": 77,
|
|
311
|
+
"description": "A rainy place",
|
|
312
|
+
"encodingType": "application/geo+json",
|
|
313
|
+
"feature": { "coordinates": [-6.22299, 53.306816], "type": "Point" },
|
|
314
|
+
"name": "Dublin",
|
|
315
|
+
"properties": {
|
|
316
|
+
"datastreams": [1, 2, 76, 2, 78, 77],
|
|
317
|
+
"multi_datastreams": [11]
|
|
318
|
+
}
|
|
319
|
+
},
|
|
320
|
+
"phenomenonTime": "2024-04-13T19:57:08+00:00",
|
|
321
|
+
"result": 87.0,
|
|
322
|
+
"resultTime": "2024-05-02T19:36:06+00:00"
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
"Datastream": {
|
|
326
|
+
"@iot.id": 77,
|
|
327
|
+
"description": "Wind direction measured with the FT-0310 Weather Station",
|
|
328
|
+
"name": "Wind direction",
|
|
329
|
+
"observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement",
|
|
330
|
+
"unitOfMeasurement": {
|
|
331
|
+
"definition": "https://qudt.org/vocab/unit/DEG",
|
|
332
|
+
"name": "degree",
|
|
333
|
+
"symbol": "deg"
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
"FeatureOfInterest": {
|
|
337
|
+
"@iot.id": 77,
|
|
338
|
+
"description": "A rainy place",
|
|
339
|
+
"encodingType": "application/geo+json",
|
|
340
|
+
"feature": { "coordinates": [-6.22299, 53.306816], "type": "Point" },
|
|
341
|
+
"name": "Dublin",
|
|
342
|
+
"properties": {
|
|
343
|
+
"datastreams": [1, 2, 76, 2, 78, 77],
|
|
344
|
+
"multi_datastreams": [11]
|
|
345
|
+
}
|
|
346
|
+
},
|
|
347
|
+
"phenomenonTime": "2024-04-13T19:57:08+00:00",
|
|
348
|
+
"result": 241.0,
|
|
349
|
+
"resultTime": "2024-05-02T19:36:06+00:00"
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
"FeatureOfInterest": {
|
|
353
|
+
"@iot.id": 77,
|
|
354
|
+
"description": "A rainy place",
|
|
355
|
+
"encodingType": "application/geo+json",
|
|
356
|
+
"feature": { "coordinates": [-6.22299, 53.306816], "type": "Point" },
|
|
357
|
+
"name": "Dublin",
|
|
358
|
+
"properties": {
|
|
359
|
+
"datastreams": [1, 2, 76, 2, 78, 77],
|
|
360
|
+
"multi_datastreams": [11]
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
"MultiDatastream": {
|
|
364
|
+
"@iot.id": 11,
|
|
365
|
+
"ObservedProperties": [
|
|
366
|
+
{
|
|
367
|
+
"@iot.id": 105,
|
|
368
|
+
"definition": "http://vocab.nerc.ac.uk/standard_name/wind_speed/",
|
|
369
|
+
"description": "Wind speed",
|
|
370
|
+
"name": "wspeed"
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
"@iot.id": 106,
|
|
374
|
+
"definition": "http://vocab.nerc.ac.uk/standard_name/wind_gust_from_direction/",
|
|
375
|
+
"description": "Wind gust",
|
|
376
|
+
"name": "wgust"
|
|
377
|
+
}
|
|
378
|
+
],
|
|
379
|
+
"description": "Wind speed average and gust measured with the FT-0310 Weather Station",
|
|
380
|
+
"multiObservationDataTypes": [
|
|
381
|
+
"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement",
|
|
382
|
+
"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement"
|
|
383
|
+
],
|
|
384
|
+
"name": "Wind speed avg and gust",
|
|
385
|
+
"observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_ComplexObservation",
|
|
386
|
+
"unitOfMeasurements": [
|
|
387
|
+
{
|
|
388
|
+
"definition": "https://qudt.org/vocab/unit/M-PER-SEC",
|
|
389
|
+
"name": "Meters per second",
|
|
390
|
+
"symbol": "m/s"
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
"definition": "https://qudt.org/vocab/unit/M-PER-SEC",
|
|
394
|
+
"name": "Meters per second",
|
|
395
|
+
"symbol": "m/s"
|
|
396
|
+
}
|
|
397
|
+
]
|
|
398
|
+
},
|
|
399
|
+
"phenomenonTime": "2024-04-13T19:57:08+00:00",
|
|
400
|
+
"result": [0.0, 0.0],
|
|
401
|
+
"resultTime": "2024-05-02T19:36:06+00:00"
|
|
402
|
+
}
|
|
403
|
+
],
|
|
404
|
+
"Party": {
|
|
405
|
+
"@iot.id": "36fd7ca4-08bb-11ef-b156-a337e8ef4d15",
|
|
406
|
+
"displayName": "LJS",
|
|
407
|
+
"role": "individual"
|
|
408
|
+
},
|
|
409
|
+
"creationTime": "2024-05-02T19:36:06+00:00",
|
|
410
|
+
"description": " ",
|
|
411
|
+
"endTime": "2024-05-02T19:36:06+00:00",
|
|
412
|
+
"name": "OG 2024-05-02T19:36:06+00:00"
|
|
413
|
+
}
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
This example with inline `Datastream` and `FeatureOfInterest` entities has the size of 6245 Bytes.
|
|
417
|
+
|
|
418
|
+
#### Example ObservationGroup with referencing entities
|
|
419
|
+
```JSON
|
|
420
|
+
{
|
|
421
|
+
"Observations": [
|
|
422
|
+
{
|
|
423
|
+
"Datastream": { "@iot.id": 1 },
|
|
424
|
+
"FeatureOfInterest": { "@iot.id": 77 },
|
|
425
|
+
"phenomenonTime": "2024-04-13T19:57:08+00:00",
|
|
426
|
+
"result": 19.111,
|
|
427
|
+
"resultTime": "2024-05-03T09:48:33+00:00"
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
"Datastream": { "@iot.id": 2 },
|
|
431
|
+
"FeatureOfInterest": { "@iot.id": 77 },
|
|
432
|
+
"phenomenonTime": "2024-04-13T19:57:08+00:00",
|
|
433
|
+
"result": 43.0,
|
|
434
|
+
"resultTime": "2024-05-03T09:48:33+00:00"
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
"Datastream": { "@iot.id": 76 },
|
|
438
|
+
"FeatureOfInterest": { "@iot.id": 77 },
|
|
439
|
+
"phenomenonTime": "2024-04-13T19:57:08+00:00",
|
|
440
|
+
"result": 87.0,
|
|
441
|
+
"resultTime": "2024-05-03T09:48:33+00:00"
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
"Datastream": { "@iot.id": 77 },
|
|
445
|
+
"FeatureOfInterest": { "@iot.id": 77 },
|
|
446
|
+
"phenomenonTime": "2024-04-13T19:57:08+00:00",
|
|
447
|
+
"result": 241.0,
|
|
448
|
+
"resultTime": "2024-05-03T09:48:33+00:00"
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
"FeatureOfInterest": { "@iot.id": 77 },
|
|
452
|
+
"MultiDatastream": { "@iot.id": 11 },
|
|
453
|
+
"phenomenonTime": "2024-04-13T19:57:08+00:00",
|
|
454
|
+
"result": [0.0, 0.0],
|
|
455
|
+
"resultTime": "2024-05-03T09:48:33+00:00"
|
|
456
|
+
}
|
|
457
|
+
],
|
|
458
|
+
"Party": {
|
|
459
|
+
"@iot.id": "4cd42a10-0932-11ef-919f-57f24e9b90e3",
|
|
460
|
+
"displayName": "LJS",
|
|
461
|
+
"role": "individual"
|
|
462
|
+
},
|
|
463
|
+
"creationTime": "2024-05-03T09:48:33+00:00",
|
|
464
|
+
"description": " ",
|
|
465
|
+
"endTime": "2024-05-03T09:48:33+00:00",
|
|
466
|
+
"name": "OG 2024-05-03T09:48:33+00:00"
|
|
467
|
+
}
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
This example with referenced `Datastream` and `FeatureOfInterest` entities has the size of 1420 Bytes.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
staplus_client/__init__.py,sha256=RVgmdwR8t9rRniqRBQcx0j8RLZACdwOOlyazQPaI-PY,2274
|
|
2
|
+
staplus_client/__version__.py,sha256=O1KDshqL_HwTROSyoJhr0ohzFc0kgcOREHUus9lKKWQ,356
|
|
3
|
+
staplus_client/utils.py,sha256=h1r-aJ0BPQ-qC9UCFFMsCoGByGxPWBG0d-kOB_VfY7U,2679
|
|
4
|
+
staplus_client/dao/__init__.py,sha256=hWK9Lk9Xt2oweUgmIAMF199ECtZa2Qeo2PpukHT9Xpk,1058
|
|
5
|
+
staplus_client/dao/actuator.py,sha256=G0Pm563_KUPmo4AsVAjv1_lKTAY9lkcA93vz9XbcDTw,1339
|
|
6
|
+
staplus_client/dao/base.py,sha256=nR5yPbgSUby66mscPPXLeo3SzwqfnoGEQWwWf_lreXA,2957
|
|
7
|
+
staplus_client/dao/campaign.py,sha256=-Mw6wa11IfrIfsb7T5Y5ZMV-tRN3nQIqZo26qvuacVU,1053
|
|
8
|
+
staplus_client/dao/datastream.py,sha256=VZ7kTbeId3J-Kv9UCTdvAiNMVDUaZbmbhDDIlOH1F2o,1615
|
|
9
|
+
staplus_client/dao/features_of_interest.py,sha256=5M0AwpFO6b3JSf3PmceM-ZroPU8BP6EZ_rjrbbAdGIc,1673
|
|
10
|
+
staplus_client/dao/historical_location.py,sha256=mrNM8EHJDhdqIq9uG5spXev0mFnk2D9XuQGBzMFDFK8,1672
|
|
11
|
+
staplus_client/dao/license.py,sha256=AAxwyZOlSMOO0kFdbHfHXH-Y0K-bwAUIbj_I2SjBHug,1050
|
|
12
|
+
staplus_client/dao/location.py,sha256=6Pe5WyCn30Fc7epBrWBZof72XBosNc5_P2fE5ekO150,1603
|
|
13
|
+
staplus_client/dao/multi_datastream.py,sha256=1d1_Cm3Jd9xuVblZbe6AEzGKbRTganZbiGV-PhauD0U,1653
|
|
14
|
+
staplus_client/dao/observation.py,sha256=0aCk8VP7aQ3ZZabqAk1-YW354kS4mnFNIcGX48quMdg,1985
|
|
15
|
+
staplus_client/dao/observation_group.py,sha256=zoPTJijjojcxXPdV27o2ctyBJQZ4_DFK0Z6i44JcUKs,1077
|
|
16
|
+
staplus_client/dao/observedproperty.py,sha256=CLUWK7QzdjK2tvNHk8n16uVbyMEhuc9qQtWDLer2PYo,1657
|
|
17
|
+
staplus_client/dao/party.py,sha256=iESNlBnbN6jCSMlihSrp2ZGbmF1sEjy7He67AD0qMa8,1044
|
|
18
|
+
staplus_client/dao/relation.py,sha256=3l380MD3E4Y9E_FNztyQx_0t1yOsW1J-_9T249XIXq8,2128
|
|
19
|
+
staplus_client/dao/sensor.py,sha256=s2MFXIUkf-BRhunCeN9fIfQl6ymHIvahWClm0xOZAvM,1587
|
|
20
|
+
staplus_client/dao/task.py,sha256=xb73rMLMyF1QCbYSuiPOgwVFylziQNGVZHzwyPLHdO8,1315
|
|
21
|
+
staplus_client/dao/tasking_capability.py,sha256=MI7f54PT7ZDgN5byAQAhqUM3p7g0UXTdC4YoM-rbNGA,1394
|
|
22
|
+
staplus_client/dao/thing.py,sha256=qo7TpDuzum5Cpchjfa9jyN525bqaBBrPCiikNgD9i0U,1582
|
|
23
|
+
staplus_client/model/__init__.py,sha256=9IZNs4MyAPo6pCGqnwmU3uibYkHV1yxjnSkq6ImnPHk,1355
|
|
24
|
+
staplus_client/model/campaign.py,sha256=mcuPx56e0Kjj-rq5ZLg5bK86ej57VNqLKKnKZWtSsrk,16207
|
|
25
|
+
staplus_client/model/datastream.py,sha256=udV-VOJeDTyTpTPvpQii0ktj22K5n4-Pzje2ZEiR-xU,6171
|
|
26
|
+
staplus_client/model/entity.py,sha256=WUIQEZvtZ1T7NylHjit3tspoVwqpdI4q3vzhp-Ogvh0,1267
|
|
27
|
+
staplus_client/model/feature_of_interest.py,sha256=tU10kTqCyVYSSmLflDSr0Ppd1rF8lzQpx4EwaNHBNeE,507
|
|
28
|
+
staplus_client/model/historical_location.py,sha256=rNVt4D1jBdGg5uGzvbh-DQl4x0zrNzMLWnqtifORPu4,629
|
|
29
|
+
staplus_client/model/license.py,sha256=1wJ90J5RTjl92D7YyrajZPojwK6mnlvUS7aG9-0ttWU,12413
|
|
30
|
+
staplus_client/model/location.py,sha256=rlOkwW1ZceH3f69Y3X-JQ3pe4w0z18OzqO0WYf-SSEw,576
|
|
31
|
+
staplus_client/model/multi_datastream.py,sha256=EiHzAXnHEDntA522PzuGAN4aCXpXz74aQ8ZC51f4nZg,6128
|
|
32
|
+
staplus_client/model/observation.py,sha256=7I4ge3H5JaFDMR9CccAhT2Uc-u2ZgT-M67LiRI-7UWs,9361
|
|
33
|
+
staplus_client/model/observation_group.py,sha256=Cl28lgzUyyHhgQVI4tIeQ-dj-HBFcq8rl6vUKU7rk0A,14980
|
|
34
|
+
staplus_client/model/observedproperty.py,sha256=G8PththdHxb2xezZ2y7X5_5csepWoFHlfxRxdzPGS5A,634
|
|
35
|
+
staplus_client/model/party.py,sha256=Go1IeSdF5ONk_lVAYGmLXOg2T3kbSrrrY9lMGqNt-r0,13213
|
|
36
|
+
staplus_client/model/relation.py,sha256=9zeeTK8vQU9Fk6Fm0GHbIihOXqk2XVKjWZgxXAZr1tk,8606
|
|
37
|
+
staplus_client/model/sensor.py,sha256=159_yFKBZG67VHcaVsHv6SMJmLAIC6aJhYHpZw_SYtM,449
|
|
38
|
+
staplus_client/model/thing.py,sha256=65b7FbuV-SsXaZjrlL8APDIvaAk3GNdO5tJMDJzLJFw,3998
|
|
39
|
+
staplus_client/model/ext/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
40
|
+
staplus_client/model/ext/entity_list.py,sha256=X_soaehalDP7kGXIiIHJOltnh_tHtK49VmO5zkMrcNg,3283
|
|
41
|
+
staplus_client/model/ext/entity_type.py,sha256=pzTL_0nDc4Mb6t5ihD5JjJoZ9EWMD5A36PlgIqpQfXo,5499
|
|
42
|
+
staplus_client/model/ext/unitofmeasurement.py,sha256=3O7KjnzsEF3PzefsoDm9bZiYB6r8BBium4dvgjbGgms,229
|
|
43
|
+
staplus_client/query/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
44
|
+
staplus_client/query/query.py,sha256=lvogJ3zSiRrtpbAgNRKhDixMWyJ7fNezA1SCJk4DxMM,4710
|
|
45
|
+
staplus_client/service/BearerAuth.py,sha256=r90fAMae_0OveJErTqUBvN0TryGJnzIjhugrbZRgRZE,946
|
|
46
|
+
staplus_client/service/__init__.py,sha256=NJtUuduHuOwxhB0QLAGqJ6K-3zzEs_TmVH3xoxenkEM,822
|
|
47
|
+
staplus_client/service/auth_handler.py,sha256=f1SbFgAuOSkljVP54mWMW1nqWIQg6tWzRqxUTDyhU5Q,974
|
|
48
|
+
staplus_client/service/staplusservice.py,sha256=zSLFzpfRnUeYHBPWnzcWFMXc3lqyylMhP_NuICluA7A,5465
|
|
49
|
+
staplus_client-0.3.3.dist-info/LICENSE,sha256=LPNKwDiu5awG-TPd0dqYJuC7k4PBPY4LCI_O0LSpW1s,7814
|
|
50
|
+
staplus_client-0.3.3.dist-info/METADATA,sha256=JcIGMw-qc8qA30tuwi1uA8FqgoEH7kjzlKTO-KD2Agw,17604
|
|
51
|
+
staplus_client-0.3.3.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
52
|
+
staplus_client-0.3.3.dist-info/top_level.txt,sha256=Sv105WQHo0sm_HFkjqpmIERzVjLIhS8kZ7cItIox0-s,15
|
|
53
|
+
staplus_client-0.3.3.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
staplus_client
|