MCPcopy Index your code
hub / github.com/aws/aws-cli / unpack_cli_arg

Function unpack_cli_arg

awscli/argprocess.py:131–149  ·  view source on GitHub ↗

Parses and unpacks the encoded string command line parameter and returns native Python data structures that can be passed to the Operation. :type cli_argument: :class:`awscli.arguments.BaseCLIArgument` :param cli_argument: The CLI argument object. :param value: The value o

(cli_argument, value)

Source from the content-addressed store, hash-verified

129
130
131def unpack_cli_arg(cli_argument, value):
132 """
133 Parses and unpacks the encoded string command line parameter
134 and returns native Python data structures that can be passed
135 to the Operation.
136
137 :type cli_argument: :class:`awscli.arguments.BaseCLIArgument`
138 :param cli_argument: The CLI argument object.
139
140 :param value: The value of the parameter. This can be a number of
141 different python types (str, list, etc). This is the value as
142 it's specified on the command line.
143
144 :return: The "unpacked" argument than can be sent to the `Operation`
145 object in python.
146 """
147 return _unpack_cli_arg(
148 cli_argument.argument_model, value, cli_argument.cli_name
149 )
150
151
152def _special_type(model):

Calls 1

_unpack_cli_argFunction · 0.85