maple.utils.misc

Miscellaneous utility functions for the MAPLE CLI.

This module provides helper functions used across various CLI commands, including URL construction for daemon communication and parsing of shorthand specifications.

Key utilities: - daemon_url: Construct daemon endpoint URLs - parse_policy_env: Parse policy@env shorthand notation - parse_error_response: Parse response JSON in case of error - load_kwargs: Load string kwargs properly into dict

Functions

daemon_url(port)

Construct the daemon API base URL.

load_kwargs(kwargs)

Helper function to load string kwargs to a dictionary

parse_error_response(resp)

Parse error response, handling JSON, XML, and plain text.

parse_policy_env(spec)

Parse policy@env shorthand specification.