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:
objectAccessors for available graphs and graph variants.
Methods Summary
Return the graph description.
Return a list of graphs.
Return the graph name.
Return options available for the given graph and target.
Return graph tags.
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:
target (understand.Ent or understand.Arch or understand.Db or understand.Inspection or None) – optional, list only graphs valid for this target
enabled_only (bool) – optional, defaults to True. When True, return only enabled graph plugins.
- 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:
- 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