The Understand Python API gives scripts access to everything Understand knows about your code — entities, references, metrics, and dependencies — and powers custom checks, graphs, and reports.

Graph#

class understand.Graph#

Bases: object

Accessors for available graphs and graph variants.

Methods Summary

description

Return the graph description.

list

Return a list of graphs.

name

Return the graph name.

options

Return options available for the given graph and target.

tags

Return graph tags.

variant

Return the graph variant/style.

Methods Documentation

description() → str#

Return the graph description.

Return type:

str

Returns:

the description, which may be an empty string

classmethod list(target=None, enabled_only=True) → list[understand.Graph]#

Return a list of graphs.

Parameters:
Return type:

list[understand.Graph]

Returns:

the list of graphs

name() → str#

Return the graph name.

Return type:

str

Returns:

the graph name

options(target) → understand.Options#

Return options available for the given graph and target.

Parameters:

target (understand.Db, understand.Ent, understand.Arch, or understand.Inspection) – database, entity, architecture, or inspection the graph applies to

Return type:

understand.Options

Returns:

the graph options

tags() → list[str]#

Return graph tags.

Tags are optional for graphs and may be empty.

Return type:

list[str]

Returns:

the list of tags

variant() → str#

Return the graph variant/style.

Return type:

str

Returns:

the graph variant