frost-sta-client 1.1.40__py2.py3-none-any.whl → 1.1.41__py2.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.
- frost_sta_client/__version__.py +1 -1
- frost_sta_client/model/multi_datastream.py +2 -2
- {frost_sta_client-1.1.40.dist-info → frost_sta_client-1.1.41.dist-info}/METADATA +10 -10
- {frost_sta_client-1.1.40.dist-info → frost_sta_client-1.1.41.dist-info}/RECORD +7 -7
- {frost_sta_client-1.1.40.dist-info → frost_sta_client-1.1.41.dist-info}/LICENSE +0 -0
- {frost_sta_client-1.1.40.dist-info → frost_sta_client-1.1.41.dist-info}/WHEEL +0 -0
- {frost_sta_client-1.1.40.dist-info → frost_sta_client-1.1.41.dist-info}/top_level.txt +0 -0
frost_sta_client/__version__.py
CHANGED
@@ -345,5 +345,5 @@ class MultiDatastream(entity.Entity):
|
|
345
345
|
self.observed_properties.next_link = state.get('Observations@iot.nextLink')
|
346
346
|
self.observed_properties.count = state.get('Observations@iot.count')
|
347
347
|
|
348
|
-
def get_dao(self):
|
349
|
-
return MultiDatastreamDao(
|
348
|
+
def get_dao(self, service):
|
349
|
+
return MultiDatastreamDao(service)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: frost-sta-client
|
3
|
-
Version: 1.1.
|
3
|
+
Version: 1.1.41
|
4
4
|
Summary: a client library to facilitate interaction with a FROST SensorThingsAPI Server
|
5
5
|
Home-page: https://github.com/FraunhoferIOSB/FROST-Python-Client
|
6
6
|
Author: Jonathan Vogl
|
@@ -34,14 +34,14 @@ identified by a URI.
|
|
34
34
|
|
35
35
|
### CRUD operations
|
36
36
|
The source code below demonstrates the CRUD operations for Thing objects. Operations for other entities work similarly.
|
37
|
-
```
|
37
|
+
```python
|
38
38
|
import frost_sta_client as fsc
|
39
39
|
|
40
40
|
url = "exampleserver.com/FROST-Server/v1.1"
|
41
41
|
service = fsc.SensorThingsService(url)
|
42
42
|
```
|
43
43
|
#### Creating Entities
|
44
|
-
```
|
44
|
+
```python
|
45
45
|
from geojson import Point
|
46
46
|
|
47
47
|
point = Point((-115.81, 37.24))
|
@@ -56,7 +56,7 @@ service.create(thing)
|
|
56
56
|
#### Querying Entities
|
57
57
|
Queries to the FROST Server can be modified to include filters, selections or expansions. The return value is always
|
58
58
|
an EntityList object, containing the parsed json response of the server.
|
59
|
-
```
|
59
|
+
```python
|
60
60
|
things_list = service.things().query().filter('id eq 1').list()
|
61
61
|
|
62
62
|
for thing in things_list:
|
@@ -69,7 +69,7 @@ replaying to the request with the first chunk accompanied by the link to the nex
|
|
69
69
|
|
70
70
|
The class `EntityList` implements the function `__iter__` and `__next__` which makes it capable of iterating
|
71
71
|
through the entire list of entities, including the calls to all chunks.
|
72
|
-
```
|
72
|
+
```python
|
73
73
|
things_list = service.things().query().list()
|
74
74
|
|
75
75
|
for thing in things_list:
|
@@ -78,7 +78,7 @@ for thing in things_list:
|
|
78
78
|
|
79
79
|
In a case where only the current chunk is supposed to be iterated, the `entities` list can be used.
|
80
80
|
|
81
|
-
```
|
81
|
+
```python
|
82
82
|
things_list = service.things().query().top(20).list()
|
83
83
|
|
84
84
|
for thing in things_list.entities:
|
@@ -88,7 +88,7 @@ for thing in things_list.entities:
|
|
88
88
|
### Queries to related entity lists
|
89
89
|
|
90
90
|
For example the Observations of a given Datastream can be queried via
|
91
|
-
```
|
91
|
+
```python
|
92
92
|
datastream = service.datastreams().find(1)
|
93
93
|
observations_list = datastream.get_observations().query().filter("result gt 10").list()
|
94
94
|
```
|
@@ -103,7 +103,7 @@ combination with a for-loop).
|
|
103
103
|
|
104
104
|
The callback function is called with one argument, which is the current index of the iteration.
|
105
105
|
|
106
|
-
```
|
106
|
+
```python
|
107
107
|
def callback_func(loaded_entities):
|
108
108
|
print("loaded {} entities!".format(loaded_entities))
|
109
109
|
|
@@ -119,7 +119,7 @@ DataArrays can be used to make the creation of Observations easier, because with
|
|
119
119
|
has to be created.
|
120
120
|
|
121
121
|
An example usage looks as follows:
|
122
|
-
```
|
122
|
+
```python
|
123
123
|
import frost_sta_client as fsc
|
124
124
|
|
125
125
|
service = fsc.SensorThingsService("exampleserver.com/FROST-Server/v1.1")
|
@@ -134,7 +134,7 @@ An example usage looks as follows:
|
|
134
134
|
datastream=datastream,
|
135
135
|
feature_of_interest=foi)
|
136
136
|
obs2 = fsc.Observation(result=5,
|
137
|
-
phenomenon_time='2022-12-
|
137
|
+
phenomenon_time='2022-12-19T10:00:00Z/2022-12-19T11:00:00Z',
|
138
138
|
datastream=datastream,
|
139
139
|
feature_of_interest=foi)
|
140
140
|
dav.add_observation(obs1)
|
@@ -1,5 +1,5 @@
|
|
1
1
|
frost_sta_client/__init__.py,sha256=N0Rs6kwdPcpyz0p-Tfq2PYIAIIZsMmnSC0QXus_AmP0,1789
|
2
|
-
frost_sta_client/__version__.py,sha256=
|
2
|
+
frost_sta_client/__version__.py,sha256=DWAwqIQAoWIfbg-vZoGPqPDby0g59bPKLTY3NX1ghhI,361
|
3
3
|
frost_sta_client/utils.py,sha256=hY9JO0F4jIXODXFu7xdFw2b6hGhYQky_UZI0UDRBPaI,4845
|
4
4
|
frost_sta_client/dao/__init__.py,sha256=RKxbQ3WLVygWyz_Kb-SzO7CfUdffq7LqtJHcHSOHmgo,221
|
5
5
|
frost_sta_client/dao/actuator.py,sha256=WxRjeetR50Pb9AbhCdtc1VRSl09pgzfA2DsPBBZy-3E,1099
|
@@ -22,7 +22,7 @@ frost_sta_client/model/entity.py,sha256=9vVTSXxMAdpZ7g2AZTan2O2JVtmymSbh5umhl-8E
|
|
22
22
|
frost_sta_client/model/feature_of_interest.py,sha256=bvjS--mOCIGs1gQhCXGlcwEgaADpTrR-3k_UG2-Y4Bk,7309
|
23
23
|
frost_sta_client/model/historical_location.py,sha256=xJMBthaHCYunJ0FvIXnlQVELNqS1AxiOGxt2zys0PCg,4735
|
24
24
|
frost_sta_client/model/location.py,sha256=Gd6lvrUli1tXQQ_IYKLigLr_bjH4s750d4u52NsRNmo,9219
|
25
|
-
frost_sta_client/model/multi_datastream.py,sha256=
|
25
|
+
frost_sta_client/model/multi_datastream.py,sha256=cx3RFMP022YRUGg3M4Vzx0O2R-0NJXGHBBMpGkFCdcY,14497
|
26
26
|
frost_sta_client/model/observation.py,sha256=AVrq7LDimz07Gq6HVigSuhmip6R0DCcnsoMsw4OwEgY,9342
|
27
27
|
frost_sta_client/model/observedproperty.py,sha256=MySjgDL9CaTWxkF2LJbG5z2nvJ4m9r9e7L7ryrOjMzM,8469
|
28
28
|
frost_sta_client/model/sensor.py,sha256=wd9FPAV3TlD44mEECpHP26aO7Qi3HQ3WmrAIWkx5ixY,8765
|
@@ -40,8 +40,8 @@ frost_sta_client/query/query.py,sha256=hXd-ffYf2HDZ5aqVA5lW5XtoijIr4-4mTfevdRDz2
|
|
40
40
|
frost_sta_client/service/__init__.py,sha256=au1GqHe1OB7Iq-i90plqmIrH-7wBE7ogDoQ2uX03Fj0,109
|
41
41
|
frost_sta_client/service/auth_handler.py,sha256=qahYUK7Z0kGvbUcdtpodIA9sngYCfJz2jqKpLVGA8Z4,1117
|
42
42
|
frost_sta_client/service/sensorthingsservice.py,sha256=ntvnqUoUmPQFn_GC8Z_jEBfEMmQBQ77-Sg0ps1FIYrM,4550
|
43
|
-
frost_sta_client-1.1.
|
44
|
-
frost_sta_client-1.1.
|
45
|
-
frost_sta_client-1.1.
|
46
|
-
frost_sta_client-1.1.
|
47
|
-
frost_sta_client-1.1.
|
43
|
+
frost_sta_client-1.1.41.dist-info/LICENSE,sha256=LPNKwDiu5awG-TPd0dqYJuC7k4PBPY4LCI_O0LSpW1s,7814
|
44
|
+
frost_sta_client-1.1.41.dist-info/METADATA,sha256=-D8mG2NN1hXKwfVTTqJjLjS5Z-eIm3AZpbNToa7CIKQ,5716
|
45
|
+
frost_sta_client-1.1.41.dist-info/WHEEL,sha256=k3vXr0c0OitO0k9eCWBlI2yTYnpb_n_I2SGzrrfY7HY,110
|
46
|
+
frost_sta_client-1.1.41.dist-info/top_level.txt,sha256=c35-3D_K1E_y8fcadqI3j6kGQ7HBrkOqCNie5Rv64KI,17
|
47
|
+
frost_sta_client-1.1.41.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|