sandbox/utils.py
def parse_environ(config: dict) -> dict:
    """Check the validity of 'environ' in the request and return it, returns an empty dictionnary
    if it is not present."""
    if "environ" in config:
        if not isinstance(config["environ"], dict):
            raise HTTPExceptions.BAD_REQUEST.with_content(
                f'environ must be an object, not {type(config["environ"])}')
        return {k: str(v) for k, v in config["environ"].items()} if "environ" in config else dict()
    return {}
Check the validity of 'environ' in the request and return it, returns an empty dictionnary
    if it is not present.
Check the validity of 'environ' in the request and return it, returns an empty dictionnary
if it is not present.
Check the validity of ' environ ' in the request and return it returns an empty dictionnary if it is not present .
def parse_environ(config: dict) -> dict:
    if "environ" in config:
        if not isinstance(config["environ"], dict):
            raise HTTPExceptions.BAD_REQUEST.with_content(
                f'environ must be an object, not {type(config["environ"])}')
        return {k: str(v) for k, v in config["environ"].items()} if "environ" in config else dict()
    return {}
def parse_environ ( config : dict ) -> dict : if "environ" in config : if not isinstance ( config [ "environ" ] , dict ) : raise HTTPExceptions . BAD_REQUEST . with_content ( f'environ must be an object, not {type(config["environ"])}' ) return { k : str ( v ) for k , v in config [ "environ" ] . items ( ) } if "environ" in config else dict ( ) return { }
Check the validity of 'environ' in the request and return it, returns an empty dictionnary
if it is not present.
Check the validity of ' environ ' in the request and return it returns an empty dictionnary if it is not present .
"""Check the validity of 'environ' in the request and return it, returns an empty dictionnary
    if it is not present."""
config
dict