# Path: riak/util.py
# class lazy_property(object):
#     '''
#     A method decorator meant to be used for lazy evaluation and
#     memoization of an object attribute. The property should represent
#     immutable data, as it replaces itself on first access.
#     '''
#     def __init__(self, fget):
#         self.fget = fget
#         self.func_name = fget.__name__
# 
#     def __get__(self, obj, cls):
#         if obj is None:
#             return None
#         value = self.fget(obj)
#         setattr(obj, self.func_name, value)
#         return value
# 
# Path: riak/datatypes/types.py
# TYPES = {}


from six import string_types, PY2
from riak.util import lazy_property
from riak.datatypes import TYPES
        from riak import RiakObject
        from riak import RiakObject
import mimetypes

        .. note:: This request is automatically retried :attr:`retries`
           times if it fails due to network error.

        :param timeout: a timeout value in milliseconds
        :type timeout: int
        :rtype: list of :class:`RiakBucket <riak.bucket.RiakBucket>`
                instances
        """
        return self._client.get_buckets(bucket_type=self, timeout=timeout)

    def stream_buckets(self, timeout=None):
        """
        Streams the list of buckets under this bucket-type. This is a
        generator method that should be iterated over.

        The caller must close the stream when finished.  See
        :meth:`RiakClient.stream_buckets()
        <riak.client.RiakClient.stream_buckets>` for more details.

        .. warning:: Do not use this in production, as it requires
           traversing through all keys stored in a cluster.

        :param timeout: a timeout value in milliseconds
        :type timeout: int
        :rtype: iterator that yields lists of :class:`RiakBucket
             <riak.bucket.RiakBucket>` instances
        """
        return self._client.stream_buckets(bucket_type=self, timeout=timeout)


# Path: riak/util.py
# class lazy_property(object):
#     '''
#     A method decorator meant to be used for lazy evaluation and
#     memoization of an object attribute. The property should represent
#     immutable data, as it replaces itself on first access.
#     '''
#     def __init__(self, fget):
#         self.fget = fget
#         self.func_name = fget.__name__
# 
#     def __get__(self, obj, cls):
#         if obj is None:
#             return None
#         value = self.fget(obj)
#         setattr(obj, self.func_name, value)
#         return value
# 
# Path: riak/datatypes/types.py
# TYPES = {}


# Path: riak/bucket.py
from six import string_types, PY2
from riak.util import lazy_property
from riak.datatypes import TYPES
        from riak import RiakObject
        from riak import RiakObject
import mimetypes


        .. note:: This request is automatically retried :attr:`retries`
           times if it fails due to network error.

        :param timeout: a timeout value in milliseconds
        :type timeout: int
        :rtype: list of :class:`RiakBucket <riak.bucket.RiakBucket>`
                instances
        """
        return self._client.get_buckets(bucket_type=self, timeout=timeout)

    def stream_buckets(self, timeout=None):
        """
        Streams the list of buckets under this bucket-type. This is a
        generator method that should be iterated over.

        The caller must close the stream when finished.  See
        :meth:`RiakClient.stream_buckets()
        <riak.client.RiakClient.stream_buckets>` for more details.

        .. warning:: Do not use this in production, as it requires
           traversing through all keys stored in a cluster.

        :param timeout: a timeout value in milliseconds
        :type timeout: int
        :rtype: iterator that yields lists of :class:`RiakBucket
             <riak.bucket.RiakBucket>` instances
        """
        return self._client.stream_buckets(bucket_type=self, timeout=timeout)


    @lazy_property