argus_cli.helpers package¶
Submodules¶
argus_cli.helpers.collections module¶
argus_cli.helpers.formatting module¶
-
argus_cli.helpers.formatting.
from_safe_name
(argument: str) → str[source]¶ Python prevents us from using the built-in keywords as parameter names in functions, so if the API requests any of these keywords, we escape them with an underscore and provide a method to escape and unescape them
Return type: str
Parameters: argument (str) – Argument name to escape, if necessary Returns: _argument if the argument was unsafe
-
argus_cli.helpers.formatting.
python_name_for
(javascript_type: str) → str[source]¶ Find the Python name for a javascript type
Parameters: javascript_type (str) – JavaScript type name, e.g array, string, integer Returns: Name for the type in python Return type: str
-
argus_cli.helpers.formatting.
to_camel_case
(snake_cased_string: str) → str[source]¶ Turns snake_cased_strings into snakeCasedStrings, reversing to_snake_case
Return type: str
Parameters: snake_cased_string (str) – snake_cased_string to convert Returns: camelCasedString
-
argus_cli.helpers.formatting.
to_caterpillar_case
(camel_cased_string: str) → str[source]¶ Replace UpperCase with upper-case and upperCase_Name with upper-case-name and splits into the dictionary levels
Parameters: camel_cased_string (str) – CamelCasedString to convert Return type: str Returns: caterpillar-cased-string
-
argus_cli.helpers.formatting.
to_safe_name
(argument: str) → str[source]¶ Python prevents us from using the built-in keywords as parameter names in functions, so if the API requests any of these keywords, we escape them with an underscore and provide a method to escape and unescape them
Return type: str
Parameters: argument (str) – Argument name to escape, if necessary Returns: _argument if the argument was unsafe
-
argus_cli.helpers.formatting.
to_snake_case
(camel_cased_string: str) → str[source]¶ Replace UpperCase with upper-case and upperCase_Name with upper_case_name and splits into the dictionary levels
Parameters: camel_cased_string (str) – CamelCasedString to convert Return type: str Returns: snake_cased_string