PERL : Libconf::Glueconf::NUT::Ups_conf C/PYTHON/RUBY : NUT/Ups_conf
Libconf::Glueconf::NUT::Ups_conf is a template for the ups.conf configuration file
$ups = new Libconf::Glueconf::NUT::Ups_conf({ filename => '/etc/ups/ups.conf' }); ... edit $ups ... $ups->write_conf();
creates the template
$template = new Libconf::Glueconf::NUT::Ups_conf({ .. arguments .. })
the options are the same as in the Libconf::Templates::Ups manpage, look there to have the details.
See <Libconf::Glueconf> for general methods