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.
Description is optional for graphs and 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 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]
- name() str#
Return the graph name.
- options(target) understand.Options#
Return options available for the given graph and target.
- Parameters:
target (understand.Db, understand.Ent, or understand.Arch) – database, entity, or architecture the graph applies to
- Return type:
- tags() list[str]#
Return graph tags.
Tags are optional for graphs and may be empty.
- variant() str#
Return the graph variant/style.