ONVIF is a standard that has been around for 10 or so years now.. but it seems like there are only a few client libraries for performing ONVIF discovery and control and they are all either low quality, feature-lacking, or not widely used / abandoned. I've been trying to find a library that can perform a simple scan of the network and tell me what ONVIF devices it found but I absolutely have been unable to do so.
What I've found so far
https://github.com/quatanium/python-onvif - this seems to only work at controlling an ONVIF device once it's been found on the network.
https://github.com/linkingvision/rapidonvif/issues/11 - has build issues reported, main README says that you need to email some dev for newer code?