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.

Atn#

class understand.Atn#

Bases: object

An Understand annotation

Annotations can be obtained for a database (understand.Db.annotations()) or for an entity (understand.Ent.annotations()).

Methods Summary

author

Return the author who created the annotation.

date

Return the date the annotation was last modified.

ent

Return the entity this annotation belongs to.

line

Return the line number if applicable.

text

Return the text of the annotation.

Methods Documentation

author() str#

Return the author who created the annotation.

Return type:

str

Returns:

the author

date() str#

Return the date the annotation was last modified.

Return type:

str

Returns:

the date time as a string of the form YYYY-MM-DDTHH:MM:SS such as 2000-01-01T19:20:30.

ent() understand.Ent#

Return the entity this annotation belongs to.

Return type:

understand.Ent

Returns:

the entity this annotation belongs to or None if the annotation is orphaned.

line() int#

Return the line number if applicable.

Return type:

int

Returns:

the line number (in the file) of the annotation or -1 if the annotation is not a line annotation.

text() str#

Return the text of the annotation.

Return type:

str

Returns:

the annotation text