Generating a Connection Configuration File for a Python Application
Before you can run your Python application, you must generate the application-specific configuration file that contains the information required to connect your application to your organization in Device Cloud.
The configuration file name you specify must match either the configuration file name in your application initialization code or must follow the convention app_id-connect.cfg, where app_id is the value you specified for the app_id parameter in your application initialization code. For more information, see Initializing Your Python Application.
For the device manager, specify the file name iot-connect.cfg.
By default, the script stores the file in the current directory. Ensure that you run the script from a directory to which you have write permissions.
You need the following:
-
the connection configuration file name or the application identifier you specified in your application initialization code
-
your user name, password, and URL for Device Cloud
-
the corresponding application defined in Device Cloud
-
if you connect through a proxy server, proxy configuration information
-
the Python agent from the Python repository installed on your device
The file is created in the localDir directory with the file name you specified.
Before you run your application, ensure that you copy the configuration file to either the directory from which you run your application or the configuration directory you specified in your application initialization code.