SDB の Python ラッパー

Google App Engine の Datastore のような事出来ます。

from boto.sdb.db.model import Model
from boto.sdb.db.property import *
from boto.sdb.db.manager import get_manager
from boto.exception import SDBPersistenceError

kAwsAccessKeyId = 'access_key_id'
kAwsSecretAccessKey = 'secret_access_key'

class Account(Model):
  """
  """
  name = StringProperty(required=True)
  password = PasswordProperty(required=True)

class Tag(Model):
  """
  """
  name = StringProperty(required=True)

  @property
  def entries(self):
    return Account.find(tags=self)

class Entry(Model):
  """
  """
  author = ReferenceProperty(Account, required=True)
  text = TextProperty()
  tags = ListProperty(Tag)
  updated = DateTimeProperty(auto_now=True)
  created = DateTimeProperty(auto_now_add=True)

class Comment(Model):
  """
  """
  entry = ReferenceProperty(Entry)
  author = StringProerty()
  text = StringProperty()

まだ、具体的にどう動かすか追っかけ中です ... /etc/boto.cfg や .boto に書くのはどーなのか。