'''
	Bank API controller
        Part of Multi-thread Cache system
	LICENSE MIT @2017 Ivan Lausuch <ilausuch@gmail.com>
'''


class Bank:
    """
    Bank API
    """

    def __init__(self, client, bank):
        self.client = client
        self.bank = bank

    def getKeys(self):
        '''
        Get all key entities of a bank
        '''
        return self.client.bank_keys(self.bank)

    def put(self, params):
        '''
        Perform an operation.
        - reset : Clean a bank
        '''
        try:
            operation = params['operation']
        except:
            raise Exception("operation parameter is required")
        else:
            if operation == "reset":
                return self.client.bank_reset(self.bank)
            else:
                return None

d3b73e167b905530f075a5be74c971fba78a695a
<mask token>


class Bank:
    <mask token>
    <mask token>
    <mask token>

    def put(self, params):
        """
        Perform an operation.
        - reset : Clean a bank
        """
        try:
            operation = params['operation']
        except:
            raise Exception('operation parameter is required')
        else:
            if operation == 'reset':
                return self.client.bank_reset(self.bank)
            else:
                return None

<mask token>


class Bank:
    <mask token>
    <mask token>

    def getKeys(self):
        """
        Get all key entities of a bank
        """
        return self.client.bank_keys(self.bank)

    def put(self, params):
        """
        Perform an operation.
        - reset : Clean a bank
        """
        try:
            operation = params['operation']
        except:
            raise Exception('operation parameter is required')
        else:
            if operation == 'reset':
                return self.client.bank_reset(self.bank)
            else:
                return None

<mask token>


class Bank:
    <mask token>

    def __init__(self, client, bank):
        self.client = client
        self.bank = bank

    def getKeys(self):
        """
        Get all key entities of a bank
        """
        return self.client.bank_keys(self.bank)

    def put(self, params):
        """
        Perform an operation.
        - reset : Clean a bank
        """
        try:
            operation = params['operation']
        except:
            raise Exception('operation parameter is required')
        else:
            if operation == 'reset':
                return self.client.bank_reset(self.bank)
            else:
                return None

<mask token>


class Bank:
    """
    Bank API
    """

    def __init__(self, client, bank):
        self.client = client
        self.bank = bank

    def getKeys(self):
        """
        Get all key entities of a bank
        """
        return self.client.bank_keys(self.bank)

    def put(self, params):
        """
        Perform an operation.
        - reset : Clean a bank
        """
        try:
            operation = params['operation']
        except:
            raise Exception('operation parameter is required')
        else:
            if operation == 'reset':
                return self.client.bank_reset(self.bank)
            else:
                return None

'''
	Bank API controller
        Part of Multi-thread Cache system
	LICENSE MIT @2017 Ivan Lausuch <ilausuch@gmail.com>
'''


class Bank:
    """
    Bank API
    """

    def __init__(self, client, bank):
        self.client = client
        self.bank = bank

    def getKeys(self):
        '''
        Get all key entities of a bank
        '''
        return self.client.bank_keys(self.bank)

    def put(self, params):
        '''
        Perform an operation.
        - reset : Clean a bank
        '''
        try:
            operation = params['operation']
        except:
            raise Exception("operation parameter is required")
        else:
            if operation == "reset":
                return self.client.bank_reset(self.bank)
            else:
                return None
