Released new versions of both the Python and Ruby interfaces to the Numerous APIs. This update allows you to call write() with the “only write it if the value changed” feature and just ignore any exception that comes (when the value hasn’t changed). This is probably a more common usage pattern. So now, for example, you can do this in python:
m.write(newvalue, onlyIf="IGNORE")
where before you would have had to write:
try:
m.write(newvalue, onlyIf=True)
except NumerousMetricConflictError:
pass
to handle the reported “no change” exception even when you didn’t care about it. Specifying onlyIf as True gives you this older behavior and specifying the string ‘IGNORE’ (must be UPPER CASE) gives the newer behavior.
The ruby library has the same enhancement.
As a reminder of typical installation methods:
% sudo pip install numerous
You may need to do “pip2” or “pip3” instead, depending on your specific environment and which flavor of python you are installing. Also if you are upgrading from an already installed version:
% sudo pip install –upgrade numerous
Similarly you install the ruby gem via “sudo gem install numerousapp” (note slight name difference here).
Github sources:
Documentation for either library can be found on its wiki page (accessible from the github home page links given above).
Leave a reply to Jimmy Sieben Cancel reply