Did I find the right examples for you? yes no

All Samples(10)  |  Call(6)  |  Derive(0)  |  Import(4)
Check if a value is equivalent to null in Dynamo 

        def is_null(value):
    """ Check if a value is equivalent to null in Dynamo """
    return (value is None or
            (isinstance(value, (set, frozenset)) and len(value) == 0))

src/d/y/dynamo3-0.1.3/dynamo3/batch.py   dynamo3(Download)
""" Code for batch processing """
import logging
import six
from .util import is_null
    def __init__(self, action, key, value=None, expected=NO_ARG):
        if is_null(value):
            if action == self.ADD:
                raise ValueError("Update must set a value for non-delete "
        if not is_null(self.value):
            ret[self.key]['Value'] = dynamizer.encode(self.value)
        return ret
    def expected(self, dynamizer):
        """ Get the expected values for the update """
        if self._expected is not NO_ARG:
            ret = {}
            if is_null(self._expected):
def _encode_write(dynamizer, data, action, key):
    """ Encode an item write command """
    # Strip null values out of data
    data = dict(((k, dynamizer.encode(v)) for k, v in six.iteritems(data) if
                 not is_null(v)))

src/d/y/dynamo3-0.1.3/dynamo3/types.py   dynamo3(Download)
from .util import is_null
    def encode_keys(self, keys):
        """ Run the encoder on a dict of values """
        return dict(((k, self.encode(v)) for k, v in six.iteritems(keys) if not

src/d/y/dynamo3-0.1.3/dynamo3/connection.py   dynamo3(Download)
from .result import ResultSet, GetResultSet, Result
from .types import Dynamizer
from .util import is_null
def build_expected(dynamizer, expected):
    """ Build the Expected parameters from a dict """
    ret = {}
    for k, v in six.iteritems(expected):
        if is_null(v):

src/d/y/dynamo3-0.1.3/dynamo3/__init__.py   dynamo3(Download)
from .fields import Throughput, Table, DynamoKey, LocalIndex, GlobalIndex
from .types import Dynamizer, Binary, TYPES, TYPES_REV
from .util import is_null
__version__ = '0.1.3'