argus_cli.helpers package — Argus-Toolbelt 1.0 documentation

# argus_cli.helpers package

## Submodules

## argus_cli.helpers.collections module

class `argus_cli.helpers.collections.` `ImmutableDeepDict`(*args, **kwargs)

  Bases: `collections.abc.MutableMapping`

  A dictionary with ability for deep get and set

  A key turns immutable after being set.

## argus_cli.helpers.formatting module

`argus_cli.helpers.formatting.` `from_safe_name`(argument: str) → str

  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

  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

  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

  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

  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

  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

## argus_cli.helpers.log module

`argus_cli.helpers.log.` `plugin`(self, message, *args, **kws)

  Custom log level for plugins

## Module contents