/usr/lib/python2.6/site-packages/boto/dynamodb2
Edit: /usr/lib/python2.6/site-packages/boto/dynamodb2/items.pyc (14472B)
Ñò
Å-õSc @ sP d d k l Z d d k l Z d e f d „ ƒ YZ d e f d „ ƒ YZ d S( iÿÿÿÿ( t deepcopy( t Dynamizert NEWVALUEc B s e Z RS( ( t __name__t
__module__( ( ( s8 /usr/lib/python2.6/site-packages/boto/dynamodb2/items.pyR s t Itemc B s e Z d Z d e d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z
d „ Z d d „ Z d „ Z
d
„ Z d „ Z e Z d „ Z d d
„ Z d „ Z d „ Z d „ Z d „ Z d „ Z d d „ Z d „ Z d „ Z d „ Z d „ Z e d „ Z d „ Z RS( s
An object representing the item data within a DynamoDB table.
An item is largely schema-free, meaning it can contain any data. The only
limitation is that it must have data for the fields in the ``Table``'s
schema.
This object presents a dictionary-like interface for accessing/storing
data. It also tries to intelligently track how data has changed throughout
the life of the instance, to be as efficient as possible about updates.
Empty items, or items that have no data, are considered falsey.
c C sq | | _ | | _ h | _ | | _ t ƒ | _ | i d j o
h | _ n | i o t | i ƒ | _ n d S( sÃ
Constructs an (unsaved) ``Item`` instance.
To persist the data in DynamoDB, you'll need to call the ``Item.save``
(or ``Item.partial_save``) on the instance.
Requires a ``table`` parameter, which should be a ``Table`` instance.
This is required, as DynamoDB's API is focus around all operations
being table-level. It's also for persisting schema around many objects.
Optionally accepts a ``data`` parameter, which should be a dictionary
of the fields & values of the item.
Optionally accepts a ``loaded`` parameter, which should be a boolean.
``True`` if it was preexisting data loaded from DynamoDB, ``False`` if
it's new data from the user. Default is ``False``.
Example::
>>> users = Table('users')
>>> user = Item(users, data={
... 'username': 'johndoe',
... 'first_name': 'John',
... 'date_joined': 1248o61592,
... })
# Change existing data.
>>> user['first_name'] = 'Johann'
# Add more data.
>>> user['last_name'] = 'Doe'
# Delete data.
>>> del user['date_joined']
# Iterate over all the data.
>>> for field, val in user.items():
... print "%s: %s" % (field, val)
username: johndoe
first_name: John
date_joined: 1248o61592
N( t tablet _loadedt
_orig_datat _dataR t
_dynamizert NoneR ( t selfR t datat loaded( ( s8 /usr/lib/python2.6/site-packages/boto/dynamodb2/items.pyt __init__ s *
c C s | i i | d ƒ S( N( R t getR ( R t key( ( s8 /usr/lib/python2.6/site-packages/boto/dynamodb2/items.pyt __getitem__P s c C s | | i |