Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 8b9fd99513
Fetching contributors…

Cannot retrieve contributors at this time

executable file 90 lines (68 sloc) 2.386 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.
import os
import ez_setup
ez_setup.use_setuptools()
from setuptools import setup
def list_files(path):
for fn in os.listdir(path):
if fn.startswith('.'):
continue
fn = os.path.join(path, fn)
if os.path.isfile(fn):
yield fn
setup(name='redis_wrap',
version = '1.0',
author="amix",
author_email="amix@amix.dk",
url="http://www.amix.dk/",
classifiers=[
"Development Status :: 4 - Beta",
"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, see LICENSE for more details.""")
Jump to Line
Something went wrong with that request. Please try again.