Details
-
Type: Monitor
-
Status: Closed
-
Priority: Major
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: 2021
-
Component/s: FIWARE-TECH-HELP
-
Labels:
-
HD-Enabler:Orion
Description
Created question in FIWARE Q/A platform on 13-03-2019 at 13:03
Please, ANSWER this question AT https://stackoverflow.com/questions/55142367/accessing-orion-cb-with-python-script
Question:
Accessing Orion CB with python script
Description:
Would like to access orion data using a python script (not using curlor Postmann. Below show the python script in my orion.pyscript:
import json
import requests
orion_endpoint="some-endpoint"
url_query=("orion_url" % (orion_endpoint))
body_dict = {
'entities': [
],
}
r_headers =
{'Content-Type': 'application/json'}#print(data["coordinates"][0][0])
r = requests.post(
url=url_query,
data=json.dumps(body_dict),
headers=r_headers
)
print(r.content)
Running this script dumps the entity information to the console. How do I use the script to subscribe for notification so I get notified (not just dumping context)?
Activity
- All
- Comments
- History
- Activity
- Transitions