Configure the Python agent
The standard installation for all agents uses this order of precedence.
Additionally, you must configure middleware and configure the Python agent with a YAML configuration file.
The Python agent launches an executable on startup that also needs access to the configuration files. Since the service is generally launched by the Python agent process, it has access to the same configuration file as the agent. However, if the service is started independently, it will attempt to use the same order of precedence for its configuration file.
In other words, the service can share the application's configuration file, if (as is usually the case) the service's working directory is also the base directory of the application. Both the agent and the service use the ./config/contrast_security.yaml
path.
Python YAML template
Use this template to configure the Python agent using a YAML configuration file. Be sure to place the YAML configuration file in your working directory or your application configuration directory.
https://docs.contrastsecurity.com/common-agent-config/python_contrast_security.yaml