# Path: sider/lazyimport.py
# class DeferredModule(types.ModuleType):
#     def __init__(self, *args, **kwargs):
#     def __getattr__(self, name):
#     def __repr__(self):
# 
# Path: sider/datetime.py
# UTC = Utc()
# 
# class FixedOffset(datetime.tzinfo):
#     """Fixed offset in minutes east from :const:`UTC`.
# 
#     .. sourcecode:: pycon
# 
#        >>> import datetime
#        >>> day = FixedOffset(datetime.timedelta(days=1))
#        >>> day
#        sider.datetime.FixedOffset(1440)
#        >>> day.tzname(None)
#        '+24:00'
#        >>> half = FixedOffset(-720)
#        >>> half
#        sider.datetime.FixedOffset(-720)
#        >>> half.tzname(None)
#        '-12:00'
#        >>> half.utcoffset(None)
#        datetime.timedelta(-1, 43200)
#        >>> zero = FixedOffset(0)
#        >>> zero.tzname(None)
#        'UTC'
#        >>> zero.utcoffset(None)
#        datetime.timedelta(0)
# 
#     :param offset: the offset integer in minutes,
#                    or :class:`~datetime.timedelta` (from a minute to a day)
#     :type offset: :class:`numbers.Integral`, :class:`datetime.timedelta`
#     :param name: an optional name.  if not present, automatically generated
#     :type name: :class:`basestring`
#     :raises exceptions.ValueError: when ``offset``'s precision is too short
#                                    or too long
# 
#     """
# 
#     #: (:class:`datetime.timedelta`) The maximum precision of
#     #: :meth:`utcoffset()`.
#     MAX_PRECISION = datetime.timedelta(days=1)
# 
#     #: (:class:`datetime.timedelta`) The minimum precision of
#     #: :meth:`utcoffset()`.
#     MIN_PRECISION = datetime.timedelta(minutes=1)
# 
#     def __init__(self, offset, name=None):
#         if isinstance(offset, numbers.Integral):
#             offset = datetime.timedelta(minutes=offset)
#         elif not isinstance(offset, datetime.timedelta):
#             raise TypeError('offset must be an integer or datetime.timedelta')
#         if offset < self.MIN_PRECISION and total_seconds(offset) > 0:
#             raise ValueError('the minimum precision of offset is minute')
#         elif offset > self.MAX_PRECISION:
#             raise ValueError('the maximum precision of offset is hour')
#         if name is None:
#             seconds = int(total_seconds(offset))
#             if seconds != 0:
#                 name = '{0:+03d}:{1:02d}'.format(seconds // 3600,
#                                                  abs(seconds) % 3600 // 60)
#             else:
#                 name = 'UTC'
#         elif not isinstance(name, basestring):
#             raise TypeError('name must be a string, not ' + repr(name))
#         self.offset = offset
#         self.name = name
# 
#     def utcoffset(self, datetime):
#         return self.offset
# 
#     def tzname(self, datetime):
#         return self.name
# 
#     def dst(self):
#         return ZERO_DELTA
# 
#     def __repr__(self):
#         cls = type(self)
#         min = int(total_seconds(self.offset) / 60)
#         return '{0}.{1}({2!r})'.format(cls.__module__, cls.__name__, min)


import sys
import re
import collections
import numbers
import datetime
import uuid
from .lazyimport import list, set, sortedset
from .datetime import UTC, FixedOffset
        from .hash import Hash
        from .hash import Hash
        pipe.delete(key)
        obj._raw_update(value, pipe)
        pipe.execute()
        return obj

    def __hash__(self):
        return super(Set, self).__hash__() * hash(self.value_type)

    def __eq__(self, operand):
        if super(Set, self).__eq__(operand):
            return self.value_type == operand.value_type
        return False


class SortedSet(Set):
    """The type object for :class:`sider.sortedset.SortedSet` objects.

    :param value_type: the type of values the sorted set will contain.
                       default is :class:`String`
    :type value_type: :class:`Bulk`, :class:`type`

    """

    def load_value(self, session, key):
        return sortedset.SortedSet(session, key, value_type=self.value_type)

    def save_value(self, session, key, value):
        if not isinstance(value, (collections.Set, collections.Mapping)):
            raise TypeError('expected a set-like or mapping object, not ' +
                            repr(value))

# Path: sider/lazyimport.py
# class DeferredModule(types.ModuleType):
#     def __init__(self, *args, **kwargs):
#     def __getattr__(self, name):
#     def __repr__(self):
# 
# Path: sider/datetime.py
# UTC = Utc()
# 
# class FixedOffset(datetime.tzinfo):
#     """Fixed offset in minutes east from :const:`UTC`.
# 
#     .. sourcecode:: pycon
# 
#        >>> import datetime
#        >>> day = FixedOffset(datetime.timedelta(days=1))
#        >>> day
#        sider.datetime.FixedOffset(1440)
#        >>> day.tzname(None)
#        '+24:00'
#        >>> half = FixedOffset(-720)
#        >>> half
#        sider.datetime.FixedOffset(-720)
#        >>> half.tzname(None)
#        '-12:00'
#        >>> half.utcoffset(None)
#        datetime.timedelta(-1, 43200)
#        >>> zero = FixedOffset(0)
#        >>> zero.tzname(None)
#        'UTC'
#        >>> zero.utcoffset(None)
#        datetime.timedelta(0)
# 
#     :param offset: the offset integer in minutes,
#                    or :class:`~datetime.timedelta` (from a minute to a day)
#     :type offset: :class:`numbers.Integral`, :class:`datetime.timedelta`
#     :param name: an optional name.  if not present, automatically generated
#     :type name: :class:`basestring`
#     :raises exceptions.ValueError: when ``offset``'s precision is too short
#                                    or too long
# 
#     """
# 
#     #: (:class:`datetime.timedelta`) The maximum precision of
#     #: :meth:`utcoffset()`.
#     MAX_PRECISION = datetime.timedelta(days=1)
# 
#     #: (:class:`datetime.timedelta`) The minimum precision of
#     #: :meth:`utcoffset()`.
#     MIN_PRECISION = datetime.timedelta(minutes=1)
# 
#     def __init__(self, offset, name=None):
#         if isinstance(offset, numbers.Integral):
#             offset = datetime.timedelta(minutes=offset)
#         elif not isinstance(offset, datetime.timedelta):
#             raise TypeError('offset must be an integer or datetime.timedelta')
#         if offset < self.MIN_PRECISION and total_seconds(offset) > 0:
#             raise ValueError('the minimum precision of offset is minute')
#         elif offset > self.MAX_PRECISION:
#             raise ValueError('the maximum precision of offset is hour')
#         if name is None:
#             seconds = int(total_seconds(offset))
#             if seconds != 0:
#                 name = '{0:+03d}:{1:02d}'.format(seconds // 3600,
#                                                  abs(seconds) % 3600 // 60)
#             else:
#                 name = 'UTC'
#         elif not isinstance(name, basestring):
#             raise TypeError('name must be a string, not ' + repr(name))
#         self.offset = offset
#         self.name = name
# 
#     def utcoffset(self, datetime):
#         return self.offset
# 
#     def tzname(self, datetime):
#         return self.name
# 
#     def dst(self):
#         return ZERO_DELTA
# 
#     def __repr__(self):
#         cls = type(self)
#         min = int(total_seconds(self.offset) / 60)
#         return '{0}.{1}({2!r})'.format(cls.__module__, cls.__name__, min)


# Path: sider/types.py
import sys
import re
import collections
import numbers
import datetime
import uuid
from .lazyimport import list, set, sortedset
from .datetime import UTC, FixedOffset
        from .hash import Hash
        from .hash import Hash

        pipe.delete(key)
        obj._raw_update(value, pipe)
        pipe.execute()
        return obj

    def __hash__(self):
        return super(Set, self).__hash__() * hash(self.value_type)

    def __eq__(self, operand):
        if super(Set, self).__eq__(operand):
            return self.value_type == operand.value_type
        return False


class SortedSet(Set):
    """The type object for :class:`sider.sortedset.SortedSet` objects.

    :param value_type: the type of values the sorted set will contain.
                       default is :class:`String`
    :type value_type: :class:`Bulk`, :class:`type`

    """

    def load_value(self, session, key):
        return sortedset.SortedSet(session, key, value_type=self.value_type)

    def save_value(self, session, key, value):
        if not isinstance(value, (collections.Set, collections.Mapping)):
            raise TypeError('expected a set-like or mapping object, not ' +
                            repr(value))

        obj = sortedset.SortedSet(session, key, value_type=self.value_type)