Blog

Posts Tagged ‘api’

New Python API

Monday, August 29th, 2011

python-logo[1]Understand now fully supports Python access to its underlying database! The new Python API allows you to write your own scripts that can create custom reports, generate your own metrics and in general make Understand deliver exactly what you want it to.

Getting Started

The Python API runs on your 3.x installation of Python, you can grab it from here if you need to install it.

Once you have Python installed you need to tell it where the Understand module is. The easiest way to do that is to add/modify the PYTHONPATH environment variable to include the module location, which is SciTools/bin/<System>/python. Also if you did not add Understand to the Path variable during installation, you will need to add the SciTools/bin/<System> directory to PATH.

Finally, to use the API you will need to put ‘import Understand’ in your script.

Documentation

The most up-to-date documentation will ship with Understand and can be accessed from the Python Console with:
   import understand
  help (understand)
A more readable version can be obtained with the python ‘pydoc’ command, which can generate an html version of the documentation. We also try to keep a current version of the Python documentation on the Manuals page.

Sample Scripts

The documentation includes some samples. More detailed example scripts are shipped with Understand in the SciTools/scripts/python folder.

Happy Scripting!

Changes to the Perl API

Thursday, April 9th, 2009

We’ve made several changes to the Understand Perl API recently. The largest change was upgrading from Perl 5.6.0 to 5.10.0 in build 473.
In addition to several cool new features like the smart match operators and switch statements, Perl 5.10 runs faster and has a smaller memory footprint. For more details on what the changes are and how to use
them, see the Perl 5.10 Release Announcement.

We are also in the process of adding Snapshot support for the Perl API for build 476. Now you can access historical versions of the code through your scripts as well. For example you can compare versions of files or write a script to compare metrics between versions. (more…)