CUPS Browsd daemon which is by default running as root if allowed in Linux/Unix systems, allow remote connections from any device on the network to create a new printer.
Start the python post server and then send the request to add the printer you will se a connection to your http server as root to add the printer.