Run Python applications
Help for reading and modifying configurations
Get help for reading and modifying the device configuration by accessing help for digidevice.config:
# python
Python 3.6.4
>>> from digidevice import config
>>> help("digidevice.config")
Help on module acl.config in digidevice:
NAME
acl.config - Python interface to ACL configuration (libconfig).
.
.
.
>>>
digidevice.runt module
Use the digidevice.runt module to access and modify the device runtime database.
The code snippet below demonstrates how to read the device runtime database using the
digidevice.runt module:
# python
Python 3.6.4
>>> from digidevice import runt
>>> runt.start()
>>> print(runt.keys(""))
['advanced', 'firmware', 'mm', 'my-variable', 'network', 'system',
'vpn']
>>> print(runt.keys("system"))
['cpu_temp', 'disk', 'load_avg', 'local_time', 'mac', 'model', 'ram',
'serial', 'uptime']
>>> print(runt.get("system.mac"))
0004F30E48A8
>>> runt.stop()
>>>
The code snippet below demonstrates how to write the device runtime database using the
digidevice.runt module:
# python
Python 3.6.4
>>> from digidevice import runt
>>> runt.start()
>>> runt.set("my-variable", "my-value")
>>> print(runt.get("my-variable"))
my-value
>>> runt.stop()
>>>
Help for reading and modifying the device runtim database
Get help for reading and modifying the device runtime database by accessing help for digidevice.runt:
Digi IX14 User Guide
Get help with Python programming on the Digi IX14
53
Need help?
Do you have a question about the IX14 and is the answer not in the manual?
Questions and answers