How to access/change configuration parameters from Python script

Hi,

I want to create a script that modifies the Wireguard peer IP address when its dynamic IP address changes by periodicaly querying the A record of the FQDN.

The logical part of the script is clear to be but as I am new to Python I am wondering how I can access VyOS CLI from my Python script to query and change parameters? The script should run on the router and I intend to only install additinal Python modules if really needed.

Any help is apprecieted.

Thanks,

Lars

Try to write script with curl to change parameter via vyos API setup in local network.