The Python 3 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. To learn more about the possibilities this powerful tool provides, checkout our blog: A Toolsmith’s Guide to the Understand API


Tutorials and Examples

There are two concepts that are critical for writing API scripts. Those concepts are entities and references. An entity is a decreet piece of code such as a class, function or object. A reference is a connection between two entities. A function calls another function or a class uses an object. A good explanation of entities, references and how they interact can be found in our Python API tutorial: 


API Tutorial 1: Getting Started with the Python API


API Tutorial 2: Writing Your First API Script


API Tutorial 3: Entities, References, and Filters


API Tutorial 4: Lexers and Lexemes


API Tutorial 5: Graphs


API Tutorial 6: Interactive Reports


API Tutorial 7: Retrieving Violations 


We also have a public Github repository with hundreds of checks and examples.


Our blog also has several articles on using the API and how to solve various problems. These articles don't just provide the script, but explain how the script works and how it was built.


Documentation

The most up-to-date documentation is accessible from the Help menu in Understand. Select Help->Python API Documentation. You can also access it here.


Sample Scripts

Our public Github repository has many examples you can use as templates. Detailed example scripts are also shipped with Understand in the SciTools/plugins/scripts/python folder.


Troubleshooting

The official python distribution from python.org includes a python3.dll which implements the stable ABI That’s what allows us to target python 3.2+ with the same module. Essentially it’s just a wrapper that forwards to the python3x.dll. Some other distributions of Python such as Anaconda may not have the python3.dll, you may be able to copy in python3.dll from the official distribution.


Cygwin

Unfortunately we are not able to support Cygwin’s python due to the unique way it links everything together from the Linux and Windows worlds.


Let us Help

Sometimes we need these custom items but we don't have the manpower or the time to get it done and we're just feeling overwhelmed. If you fall into this category, then reach out to us at support@scitools.com and we will work with you to determine exactly what you need, get you a quote, and get the job done for you as quickly as possible.