Пример #1
0
def delete(key):
    """
    Delete value by key
    """
    key = str(key)
    client = get_pylibmc_client()
    result = client.delete(key)
    if result:
        print 'KEY:', key
        print 'RES: Deleted!'
    else:
        click.echo('Error: Not found!')
Пример #2
0
def get(key):
    """
    Get value by key
    """
    key = str(key)
    client = get_pylibmc_client()
    result = client.get(key)
    if result:
        print 'KEY:', key
        print 'VAL:', result
    else:
        click.echo('Error: Not found!')