OpenMTC/doc/training/onem2m-examples/onem2m-example-5a.py

14 lines
271 B
Python
Raw Normal View History

2017-11-07 13:41:38 +00:00
# Example 5a: Create OneM2MRequest
from openmtc_onem2m.transport import OneM2MRequest
from openmtc_onem2m.model import AE
my_app = AE(App_ID="myApp")
request = OneM2MRequest("create", to="onem2m", pc="my_app")
print request.to
#>>> onem2m
print request.pc
#>>> myApp