autouml Package

autouml provides decorators to trace method calls in your code during execution time.

autouml.sequence_dia(*args, **kwargs)[source]

gets the configured decorator

autouml.set_options(show_arguments=False, use_instance_ids=False)[source]

fill in internal options dictionary

decorators

Decorators for all object types

autouml.decorators.get_decorator(logger_name='autouml', show_arguments=True, use_instance_ids=False)[source]

This function will return a decorator wrapper

log

plantuml files are generated through a logger

class autouml.log.UMLFormatter(fmt=None, datefmt=None)[source]

Bases: logging.Formatter

This is a minimal wrapper for injecting debug messages in plantuml as comments.

format(record)[source]
autouml.log.closeuml()[source]

Closes plantuml diagram syntax and tries to generate the image. Intended to be called on program exit

autouml.log.startuml(theme='')[source]

formatter

Formatters for beutifying logs

autouml.formatter.class_box(class_id_name)[source]
autouml.formatter.class_name(the_class, use_id=False)[source]

Returns class name and, optionally, instance id

autouml.formatter.constructor_arrow(*args, **kwargs)[source]

Returns a sequence string arrow for constructor methods

>>> constructor_arrow('A', 'B', '__init__', 'x', {} )
'A ->o B: __init__(x)'
autouml.formatter.draw_box(class_name)[source]
autouml.formatter.format_args(args, kwargs)[source]

Makes a nice string representation of all the arguments Taken from format_args

>>> args = (1, 2)
>>> kwargs = {'one': 1, 'two': 2}
>>> format_args(args, kwargs)
'(1, 2, two=2, one=1)'
autouml.formatter.generic_arrow(class1, class2, the_method, args, kwargs, arrow='', use_instance_ids=False, show_arguments=True)[source]

Returns a sequence string

>>> generic_arrow('A', 'B', 'f', 'x', {} )
'A -> B: f(x)'
autouml.formatter.method_arrow(*args, **kwargs)[source]

Returns a sequence string arrow for methods

>>> method_arrow('A', 'B', 'f', 'x', {} )
'A -> B: f(x)'
autouml.formatter.method_name(the_method)[source]