Google API v3からAppEngine データストアに連絡先を保存したいと考えています。これらのデータを保存する最良の方法は何か、特にモデルが既に存在する場合はどうすればよいか知りたいです!
gdata のソースを見ると、非常に興味深い始まりを見つけました。しかし、これは python のみでのデータのモデリングであり、データストアではありません。
質問 : このモデルは Python に既に存在しますか?
そうでない場合:
質問 : ゼロから始めるのに最適な方法は何ですか?
Python での連絡先の最初の例:
class Contact(db.Model):
"""
https://developers.google.com/gdata/docs/2.0/elements?hl=fr#gdContactKind
https://developers.google.com/appengine/docs/python/datastore/datamodeling
"""
content = db.Text()
"""atom:content Notes about the contact."""
link = db.ListProperty(Link,indexed=False,default=[])
"""atom:link* Links to related information. Specifically, atom:link[@rel='alternate'] links to an HTML page describing the contact."""
title = db.StringProperty()
"""atom:title Contact's name. This field is read only. To modify the contact's name, see gd:name."""
email = db.ListProperty(Email,indexed=False,default=[])
"""gd:email* Email addresses."""
"""etc..."""
class Link(db.Model):
"""
Link
"""
link = db.LinkProperty()
class Email(db.Model):
"""
Email
"""
email_address = db.EmailProperty()
class EmailImParent(db.Model):
address = db.StringProperty()
label = db.StringProperty()
rel = db.StringProperty()
primary = db.StringProperty()
class Email(db.Model,EmailImParent):
"""
The gd:email element.
"""
email = db.EmailProperty()
display_name = db.StringProperty()