def zset_example():
    from uuid import uuid4
    from redis import StrictRedis
    from zato.redis_paginator import ZSetPaginator
    conn = StrictRedis()
    key = 'paginator:{}'.format(uuid4().hex)
    for x in range(1, 18):
        conn.zadd(key, x, chr(96 + x))
    p = ZSetPaginator(conn, key, 6)
    print(p.count)
    print(p.num_pages)
    print(p.page_range)
    page = p.page(3)
    print(page)
    print(page.object_list)
    conn.delete(key)