def get_item(key):
    """Return content in cached file in JSON format"""
    CACHED_KEY_FILE = os.path.join(CURRENT_DIR, key)

    try:
        return json.loads(open(CACHED_KEY_FILE, "rb").read().decode('UTF-8'))["_"]
    except (IOError, ValueError):
        return None
def get_item ( key ) : CACHED_KEY_FILE = os . path . join ( CURRENT_DIR , key ) try : return json . loads ( open ( CACHED_KEY_FILE , "rb" ) . read ( ) . decode ( 'UTF-8' ) ) [ "_" ] except ( IOError , ValueError ) : return None
Return content in cached file in JSON format