Understand’s Python API

Welcome to the Python API of Understand. This powerful interface allows you to conveniently access Understand databases using a class-oriented approach. Explore these concise examples to learn how to utilize the API effectively. Additionally, we invite you to delve into our extensive open-source repository, where you can collaborate, discover, and exchange various scripts and plugins.

With the Understand Python API, you can effortlessly create scripts to retrieve data from Understand or develop GUI plugins that seamlessly interact with the following features:

Module Contents

Functions

checksum(text [,len])

Return a checksum of the text

license(name)

Set a regcode string or a specific path to an understand license.

open(dbname)

Open a database from the passed in filename.

setlicensecode(name)

Set an Understand license code.

version()

Return the current version (Major and Minor) and the build number for this module separated by '.'

Classes

Arch()

An Understand architecture

Atn()

An Understand annotation

AutomaticArch()

Automatic architecture plugin architecture object

CFGraph()

A control flow graph

CFNode()

A node in a control flow graph

Cache()

Cache object

Check()

CodeCheck plugin check object

CheckViolation()

CodeCheck plugin violation object

Db()

An Understand database

Edge()

Graph plugin edge object

Ent()

An Understand entity

Graph()

Graph plugin graph object

IReport()

IReport plugin report object

Kind()

The kind of an entity or reference.

Legend()

Graph plugin legend object

Lexeme()

A token recieved from a lexer.

Lexer()

A lexical stream generated for a file entity.

Metric

Accessors for available metrics and metric descriptions.

MetricId()

Metric plugin object

Node()

Graph plugin node object

Options()

All plugins options object

Ref()

An Understand reference.

UnderstandError

An error message from Understand

Violation()

A violation

Indices and tables