powercli.static

Declare values used in PowerCLI API as static.

Module Contents

Classes

Static

A wrapper around a value that when called with a single argument (the context) simply returns the wrapped value.

API

class powercli.static.Static

A wrapper around a value that when called with a single argument (the context) simply returns the wrapped value.

This is useful when used for attributes where the actual context is irrelevant. On top of that external code such as the help message generator can improve the output if a static object is used.

Examples

from powercli import Flag, Static

Flag(
    # ...
    required=Static(True)
)
value: powercli.static.Static.T

None

The wrapped value that is returned when this object is called.