google.appengine.api.datastore_entities module

Summary

Classes for common kinds, including Contact, Message, and Event.

Most of these kinds are based on the gd namespace "kinds" from GData:

http://code.google.com/apis/gdata/common-elements.html

Contents

class google.appengine.api.datastore_entities.Contact(title, kind='Contact')source

Bases: google.appengine.api.datastore_entities.GdKind

A contact: a person, a venue such as a club or a restaurant, or an organization.

This is the gd Contact kind. See: http://code.google.com/apis/gdata/common-elements.html#gdContactKind

Most of the information about the contact is in the <gd:contactSection> element; see the reference section for that element for details.

These properties are meaningful. They are all optional.

title string contact's name content string notes email Email* email address geoPt GeoPt* geographic location im IM* IM address phoneNumber Phonenumber* phone number postalAddress PostalAddress* mailing address link Link* link to more information category Category* tag or label associated with this contact

  • means this property may be repeated.

CONTACT_SECTION_HEADER = '\n <gd:contactSection>'
CONTACT_SECTION_PROPERTIES = ['email', 'geoPt', 'im', 'phoneNumber', 'postalAddress']
KIND_PROPERTIES = ['title', 'content', 'link', 'category']
ToXml()source

Override GdKind.ToXml() to put some properties inside a gd:contactSection.

class google.appengine.api.datastore_entities.Event(title, kind='Event')source

Bases: google.appengine.api.datastore_entities.GdKind

A calendar event.

Includes the event title, description, location, organizer, start and end time, and other details.

This is the gd Event kind. See: http://code.google.com/apis/gdata/common-elements.html#gdEventKind

These properties are meaningful. They are all optional.

title string event name content string event description author string the organizer's name where string* human-readable location (not a GeoPt) startTime timestamp start time endTime timestamp end time eventStatus string one of the Event.Status values link Link* page with more information category Category* tag or label associated with this event attendee Contact* attendees and other related people

  • means this property may be repeated.

The Contact properties should be Keys of Contact entities. They are represented in the XML encoding as linked <gd:who> elements.

CONTACT_PROPERTIES = ['attendee']
KIND_PROPERTIES = ['title', 'content', 'author', 'where', 'startTime', 'endTime', 'eventStatus', 'link', 'category']
class Statussource
CANCELED = 'canceled'
CONFIRMED = 'confirmed'
TENTATIVE = 'tentative'
Event.ToXml()source

Override GdKind.ToXml() to special-case author, gd:where, gd:when, and gd:eventStatus.

class google.appengine.api.datastore_entities.GdKind(kind, title, kind_properties, contact_properties=[])source

Bases: google.appengine.api.datastore.Entity

A base class for gd namespace kinds.

This class contains common logic for all gd namespace kinds. For example, this class translates datastore (app id, kind, key) tuples to tag: URIs appropriate for use in <key> tags.

FOOTER = u'\n</entry>'
HEADER = u"<entry xmlns:gd='http://schemas.google.com/g/2005'>\n <category scheme='http://schemas.google.com/g/2005#kind'\n term='http://schemas.google.com/g/2005#%s' />"
ToXml()source

Returns an XML representation of this entity, as a string.

class google.appengine.api.datastore_entities.Message(title, kind='Message')source

Bases: google.appengine.api.datastore_entities.GdKind

A message, such as an email, a discussion group posting, or a comment.

Includes the message title, contents, participants, and other properties.

This is the gd Message kind. See: http://code.google.com/apis/gdata/common-elements.html#gdMessageKind

These properties are meaningful. They are all optional.

title string message subject content string message body from Contact* sender to Contact* primary recipient cc Contact* CC recipient bcc Contact* BCC recipient reply-to Contact* intended recipient of replies link Link* attachment category Category* tag or label associated with this message geoPt GeoPt* geographic location the message was posted from rating Rating* message rating, as defined by the application

  • means this property may be repeated.

The Contact properties should be Keys of Contact entities. They are represented in the XML encoding as linked <gd:who> elements.

CONTACT_PROPERTIES = ['from', 'to', 'cc', 'bcc', 'reply-to']
KIND_PROPERTIES = ['title', 'content', 'link', 'category', 'geoPt', 'rating']

Send feedback about...

App Engine standard environment for Python