Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 77 lines (58 sloc) 2.08 KB
#!/usr/bin/env python
# Copyright (c) 2007 Qtrac Ltd. All rights reserved.
# This module is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at
# your option) any later version.
from setuptools import setup
setup(name='redis_wrap',
version = '1.4.5',
author="amix",
author_email="amix@amix.dk",
url="http://www.amix.dk/",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Topic :: Software Development :: Libraries :: Python Modules",
],
packages=['redis_wrap'],
platforms=["Any"],
license="BSD",
keywords='redis wrapper',
description="Implements a wrapper for Redis datatypes so they mimic the datatypes found in Python.",
long_description="""\
redis_wrap
---------------
Implements a wrapper for Redis datatypes so they mimic the datatypes found in Python.
Requires Redis 2.0+ and newest version of redis-py.
For best performance the wrappers are lazy and use direct Redis calls.
E.g. __len__ of list wrapper is implemented by calling llen.
redis-py can be downloaded from here:
* http://github.com/andymccurdy/redis-py
Examples
----------
Example of list wrapper::
bears = get_list('bears')
bears.append('grizzly')
assert len(bears) == 1
assert 'grizzly' in bears
Example of hash wrapper::
villains = get_hash('villains')
assert 'riddler' not in villains
villains['riddler'] = 'Edward Nigma'
assert 'riddler' in villains
assert len(villains.keys()) == 1
del villains['riddler']
assert len(villains) == 0
Example of set wrapper::
fishes = get_set('fishes')
assert 'nemo' not in fishes
fishes.add('nemo')
assert 'nemo' in fishes
for item in fishes:
assert item == 'nemo'
Copyright: 2010 by amix
License: BSD.""")